HMI Map header problem

69 views
Skip to first unread message

Milo-BC

unread,
Nov 26, 2014, 1:26:06 AM11/26/14
to su...@googlegroups.com
Hi guys,

When I try to plot a Map of a standard HMI fits magnetogram using the next commands

import sunpy.map
hmimap = sunpy.map.Map('hmi.m_45s.2011.03.09_22-33-00_TAI.magnetogram.fits')

I get the next: ERROR:astropy:NameError: global name 'header' is not defined

I'd say that I've been plotting AIA fits file using the same method and I don't get any problem. 

Someone could say me what I'm doing wrong?

Gracias ;) 

Pdta: Just in case, the fits file that I'm using could be found in http://sprg.ssl.berkeley.edu/~milo/hmi.m_45s.2011.03.09_22-33-00_TAI.magnetogram.fits



DVD PS

unread,
Nov 26, 2014, 3:24:30 AM11/26/14
to sunpy
Hola Milo,

Could you tell us which version of sunpy you are using?

import sunpy
print(sunpy.__version__)

and how did you install it?

using pip, from git, ...

That will help us to understand where to look for the bug.  I've just tested on the latest development version and it works (figure attached).

Have a good day!
David


--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sunpy+un...@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at http://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.

hmi.jpg

Steven Christe

unread,
Nov 26, 2014, 10:05:33 AM11/26/14
to su...@googlegroups.com
Looks like it might be an astropy issue so knowing what version of astropy you are using would also be helpful.
> <hmi.jpg>

Stuart Mumford

unread,
Nov 26, 2014, 10:22:19 AM11/26/14
to su...@googlegroups.com
Hi,

Steven, without the full traceback I can't be sure but I don't think it is an astropy issue, I think it is just the astropy logger catching the exception.

Milo, can you run the following code and paste the output into here please:

>>> import sunpy
>>> sunpy.system_info()

This should give us all the info we need.

Thanks
Stuart

Steven Christe

unread,
Nov 27, 2014, 9:42:45 AM11/27/14
to su...@googlegroups.com
We should probably do something about that so that our errors do not look like astropy errors. Can we configure the astropy logger to give full tracebacks?

Milo-BC

unread,
Nov 27, 2014, 10:56:04 AM11/27/14
to su...@googlegroups.com
Hi guys,

Thank you for the help, after follow your advice I realised that I had not upgraded some libraries. I made the next upgrades:

Python 2.7.6     -->     Python 2.7.8
Numpy 1.8.0     -->     Numpy 1.9.0
Scipy 0.13.3     -->     Scipy 0.14.0
matplotlib 1.3.1 -->    matplotlib 1.4.0
astropy 0.3        -->    astropy 0.4.2
Pandas 0.13.1   -->   Pandas 0.14.1

With this changes I was able to make the HMI map that I wanted. 

Muchas gracias,

Juan Camilo Buitrago Casas

unread,
Nov 27, 2014, 10:52:26 PM11/27/14
to su...@googlegroups.com
Hi Guys,


Thank you for your help. Running the two lines that you asked me I obtain the next:


==========================================================
 SunPy Installation Information

==========================================================

###########
 General
###########
Time : Wednesday, 26. November 2014 03:31PM UT
System : Darwin
Processor : i386
Arch : 64bit
SunPy : Missing version.py; re-run setup.py
SunPy_git : N/A
OS: Mac OS X 10.9.5 (i386)


###########
 Required Libraries 
###########
Python: 2.7.6
NumPy: 1.8.0
SciPy: 0.13.3
matplotlib: 1.3.1
Astropy: 0.3
Pandas: 0.13.1


###########
 Recommended Libraries 
###########
beautifulsoup: 4.3.2
PyQt: 4.10.3
SUDS: 0.4
Sqlalchemy: NOT INSTALLED
Requests: NOT INSTALLED





> Pdta: Just in case, the fits file that I'm using could be found inhttp://sprg.ssl.berkeley.edu/~milo/hmi.m_45s.2011.03.09_22-33-00_TAI.magnetogram.fits

>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "SunPy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email tosunpy+un...@googlegroups.com.
> To post to this group, send email to su...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sunpy.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "SunPy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email tosunpy+un...@googlegroups.com.
> To post to this group, send email to su...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sunpy.
> For more options, visit https://groups.google.com/d/optout.
> <hmi.jpg>

--
You received this message because you are subscribed to the Google Groups "SunPy" group.
To unsubscribe from this group and stop receiving emails from it, send an email tosunpy+un...@googlegroups.com.
To post to this group, send email to su...@googlegroups.com.
Visit this group at http://groups.google.com/group/sunpy.
For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to a topic in the Google Groups "SunPy" group.
To unsubscribe from this topic, visithttps://groups.google.com/d/topic/sunpy/E7UOKr4WAHQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email tosunpy+un...@googlegroups.com.

Steven Christe

unread,
Nov 28, 2014, 10:12:46 AM11/28/14
to su...@googlegroups.com
Great! When in doubt upgrading usually fixes things.
Reply all
Reply to author
Forward
0 new messages