These are chat archives for astropy/astropy

1st
Jul 2014
Thomas Robitaille
@astrofrog
Jul 01 2014 08:35
I'm around today
(ping @keflavich)
Stuart Mumford
@Cadair
Jul 01 2014 09:11
hey @astrofrog
Thomas Robitaille
@astrofrog
Jul 01 2014 10:01
hi @Cadair! are you still around?
I was just about to ask you a question
Stuart Mumford
@Cadair
Jul 01 2014 10:01
hey
the WCSAxes transform graph stuff is awesome
I might see if I can make it work with SunPy today
Thomas Robitaille
@astrofrog
Jul 01 2014 10:02
cool!
Stuart Mumford
@Cadair
Jul 01 2014 10:02
sunpy/sunpy#1069
Thomas Robitaille
@astrofrog
Jul 01 2014 10:02
I've also been working on arbitrary shaped frames for WCSAxes
Stuart Mumford
@Cadair
Jul 01 2014 10:02
we have the start of a coordinates system now
@astrofrog neat! So you can have weird ones like circular frames?!
Thomas Robitaille
@astrofrog
Jul 01 2014 10:04
Yup: astrofrog/wcsaxes#60
also trying to send you one via chat
Stuart Mumford
@Cadair
Jul 01 2014 10:04
that's epic
Thomas Robitaille
@astrofrog
Jul 01 2014 10:04
chat not working, sent it by email
ok, so I have a favour to ask
could you send me the script + files needed to make that awesome movie you made a couple of weeks back?
I'd like to re-run it and customize it for the presentation I'm preparing
(full credit to you of course)
Stuart Mumford
@Cadair
Jul 01 2014 10:07
yeah I will see if I can sort it out
how much data do you want?!
has astropy 0.4.0rc1 gone up on PyPI yet?
Thomas Robitaille
@astrofrog
Jul 01 2014 10:08
data-wise, whatever is needed to make the movie if that's easy? how much is that?
astropy 0.4.0rc1 -> today
Stuart Mumford
@Cadair
Jul 01 2014 10:09
@VaticanCameos change the .travis.yml in your branch to use the git address for astropy
@astrofrog depends what time cadence you want
Thomas Robitaille
@astrofrog
Jul 01 2014 10:10
what did you use for the movie you made?
I wanted to make something similar
Thomas Robitaille
@astrofrog
Jul 01 2014 10:10
if it's a lot of data, maybe you could send me only a few, then I can adjust the script and send it back and you can generate the full movie?
Stuart Mumford
@Cadair
Jul 01 2014 10:10
I have 16G of data
which is cropped boxes full cadence
Thomas Robitaille
@astrofrog
Jul 01 2014 10:11
ok - 16Gb wouldn't be a problem here, but maybe not easy to share?
Stuart Mumford
@Cadair
Jul 01 2014 10:11
if you can give me a ftp server or similar to put it on then it's not an issue
Thomas Robitaille
@astrofrog
Jul 01 2014 10:11
ok
checking
Stuart Mumford
@Cadair
Jul 01 2014 10:14
There is an anonymous ftp server I could use here
it will take at least 1 day to be available though.
Thomas Robitaille
@astrofrog
Jul 01 2014 10:34
@Cadair - sorry for disappearing, I have a server here
ftp ftp.mpia.de 
username: ftp or anonymous 
password: your e-mail address 
cd pub/[your username]/incoming 
put my.file 
mput multiple.files*
[your username] is my last name, all lowercase
could you upload it there?
Stuart Mumford
@Cadair
Jul 01 2014 10:36
yep no problem
I am just taring it
it's now only 3.9G
Thomas Robitaille
@astrofrog
Jul 01 2014 10:37
perfect!
Stuart Mumford
@Cadair
Jul 01 2014 10:38
I get cannot connect to server
I take it that it is on port 21
oh nope
Thomas Robitaille
@astrofrog
Jul 01 2014 10:38
should be... is it not?
Stuart Mumford
@Cadair
Jul 01 2014 10:38
now I am getting login error
Thomas Robitaille
@astrofrog
Jul 01 2014 10:39
did you put anonymous for the username?
Stuart Mumford
@Cadair
Jul 01 2014 10:39
I am in
Thomas Robitaille
@astrofrog
Jul 01 2014 10:40
I see the file - perfect!
thanks so much
Stuart Mumford
@Cadair
Jul 01 2014 10:40
that is wrong
bad file
I can't delete it tho :p
Thomas Robitaille
@astrofrog
Jul 01 2014 10:40
it's ok, will do :)
Stuart Mumford
@Cadair
Jul 01 2014 10:41
the mainfile is uploading, eta 45 mins
Thomas Robitaille
@astrofrog
Jul 01 2014 10:41
perfect! does it include the script or will you upload that separately?
Stuart Mumford
@Cadair
Jul 01 2014 10:41
I will sort that out for you in a min
Thomas Robitaille
@astrofrog
Jul 01 2014 10:41
ok cool :)
How's the sunpy.coordinates integration with astropy.coordinates coming along?
Stuart Mumford
@Cadair
Jul 01 2014 10:42
We have a working version
Thomas Robitaille
@astrofrog
Jul 01 2014 10:42
Great!
I will be interested to see if it works ok with WCSAxes
Stuart Mumford
@Cadair
Jul 01 2014 10:43
yeah I am going to try that out later
Thomas Robitaille
@astrofrog
Jul 01 2014 10:44
I :heart: interoperability
Stuart Mumford
@Cadair
Jul 01 2014 10:44
indeed
This is what I like about working with you and astropy
we get so much cool stuff 'for free
'
Thomas Robitaille
@astrofrog
Jul 01 2014 10:45
provided you are patient ;)
Stuart Mumford
@Cadair
Jul 01 2014 10:45
yeah!
I really need gWCS
like baaaad
Thomas Robitaille
@astrofrog
Jul 01 2014 10:45
btw in WCSAxes you can now already pass non-WCS transforms
Stuart Mumford
@Cadair
Jul 01 2014 10:45
that's neat
Thomas Robitaille
@astrofrog
Jul 01 2014 10:45
you can pass a matplotlib transform object + metadata in a separate dict
Stuart Mumford
@Cadair
Jul 01 2014 10:45
nice
Thomas Robitaille
@astrofrog
Jul 01 2014 10:46
so any arbitrary transform is fine
integration with gWCS will be easy
Stuart Mumford
@Cadair
Jul 01 2014 10:46
it's not the generalised transoforms I need it's a 'standard' way of representing the physical type and coordinates of each axis in an arry
Thomas Robitaille
@astrofrog
Jul 01 2014 10:46
right
Stuart Mumford
@Cadair
Jul 01 2014 10:46
the generalised bit will be useful for pipeline stuff
but for SunPy core it's the description stuff
Thomas Robitaille
@astrofrog
Jul 01 2014 10:47
right I see
Stuart Mumford
@Cadair
Jul 01 2014 10:47
I had a question, can astropy.wcs handle temporal axes?
Thomas Robitaille
@astrofrog
Jul 01 2014 10:47
in principle there's no reason why not
you can set the cunit to anything
the question is whether it understands it is time and whether it can transform between them
but representation-wise, yes you can do it
Stuart Mumford
@Cadair
Jul 01 2014 10:48
I might have to give that a try
Thomas Robitaille
@astrofrog
Jul 01 2014 10:49
I think they are right now working on the paper for time
Stuart Mumford
@Cadair
Jul 01 2014 10:50
lol Time and relative dimension in space
+infinity for that
Thomas Robitaille
@astrofrog
Jul 01 2014 10:53
Once it's implemented in wcslib it will be easy to use in astropy
and hopefully integrate with our Time object
back later!
Stuart Mumford
@Cadair
Jul 01 2014 11:04
@astrofrog 50% complete
Thomas Robitaille
@astrofrog
Jul 01 2014 11:25
Now 3.9Gb - is it done?
ah no, still uploading, ignore me :)
Stuart Mumford
@Cadair
Jul 01 2014 11:28
98.5% dones
@astrofrog it is done
Thomas Robitaille
@astrofrog
Jul 01 2014 11:29
thanks!
Stuart Mumford
@Cadair
Jul 01 2014 11:31
I am just going to look at the code
Thomas Robitaille
@astrofrog
Jul 01 2014 11:32
Thanks!
Stuart Mumford
@Cadair
Jul 01 2014 11:36
@astrofrog This script should work if you point it at the right dir
it is also set up for SunPy 0.5.0
Thomas Robitaille
@astrofrog
Jul 01 2014 12:05
@Cadair - thanks!!
Stuart Mumford
@Cadair
Jul 01 2014 12:06
let me know if you need anything else
I am currently playing with wcsaxes + solar coord frames
@astrofrog how do you map WCS coords to a frame?
Thomas Robitaille
@astrofrog
Jul 01 2014 12:06
wait, matplotlib can write out with ffmpeg? awesome!
hmm
can you give an example?
Stuart Mumford
@Cadair
Jul 01 2014 12:07
so I create a wcs object
which is in a coord frame
if I want to set up an overlay in a different frame using coords
how does wcsaxes know what frame the WCS coords are in?
Thomas Robitaille
@astrofrog
Jul 01 2014 12:07
ok I see
hmm
2 sec
for now, you can hard-code it in your local version, and I'll think about how to generalize this
Stuart Mumford
@Cadair
Jul 01 2014 12:11
@astrofrog where is that called?
Looks like some kind of mapping dict is needed
Stuart Mumford
@Cadair
Jul 01 2014 12:38
@astrofrog the only way I can make that work is edit that function in utils
is there some point in the API where I can override it?
Stuart Mumford
@Cadair
Jul 01 2014 12:48
@astrofrog @anizami What is the coord_meta thing
and why has it's presence broken my code!!
Thomas Robitaille
@astrofrog
Jul 01 2014 12:53
@Cadair - sorry, back
Stuart Mumford
@Cadair
Jul 01 2014 12:54
ok I think I am working this out now
I am approving
Thomas Robitaille
@astrofrog
Jul 01 2014 12:54
@Cadair - at the moment you have to edit that directly, but since you've raised that point, I agree we need to generalize
coord_meta is used if you want to specify a transform instead of wcs
what broke/
Stuart Mumford
@Cadair
Jul 01 2014 12:54
there is now a sunpy import in wcsaxes :p
this broke: overlay = ax.get_coords_overlay(SolarHGtoHPC().inverted())
Thomas Robitaille
@astrofrog
Jul 01 2014 12:55
huh, wonder why it broke
ah yes
ahhh
Stuart Mumford
@Cadair
Jul 01 2014 12:55
I am currently building a coord_meta by hand
Thomas Robitaille
@astrofrog
Jul 01 2014 12:55
ok, so you need to define a coord_meta which tells it what that transformation returns
right that's what you need to do
there's an example in the tests
it's because otherwise there's no way to know what the output units are from your transformation
Stuart Mumford
@Cadair
Jul 01 2014 12:56
can it not get that info from the coordinate
and what is 'name'?
Thomas Robitaille
@astrofrog
Jul 01 2014 12:57
SolarHGtoHPC returns only floats, so it doesn't know what the units are
and it's wrong to use the underlying WCS
Stuart Mumford
@Cadair
Jul 01 2014 12:57
oh yeh, I am trying this with the coordinate frames atm
Thomas Robitaille
@astrofrog
Jul 01 2014 12:57
see the test I sent above - the original WCS returns km and the transform transforms to degrees
Stuart Mumford
@Cadair
Jul 01 2014 12:57
and getting the same thing
Thomas Robitaille
@astrofrog
Jul 01 2014 12:57
name is just used for ax.coords[<name>]
Stuart Mumford
@Cadair
Jul 01 2014 12:58
I keep getting NotImplementedError: coord_wrap is not yet supported for non-longitude coordinates
Thomas Robitaille
@astrofrog
Jul 01 2014 12:59
can you show me coord_meta?
Stuart Mumford
@Cadair
Jul 01 2014 12:59
one sec
I should learn to read
Thomas Robitaille
@astrofrog
Jul 01 2014 12:59
you set it for the latitude too, yes? I did that too and spent 10 minutes figuring it out ;)
btw: sunpy/sunpy#1084
weirdly that is simply crashing on python 3.4, weird that it doesn't trigger a failure on travis
Stuart Mumford
@Cadair
Jul 01 2014 13:00
I can't spell
ah yeah, we have a open PR to fix that
Thomas Robitaille
@astrofrog
Jul 01 2014 13:00
ok feel free to close the issue then
sorry for the duplication
Stuart Mumford
@Cadair
Jul 01 2014 13:00
sunpy/sunpy#1066
that's ok
it's not obvious what it is doing
I need to clean up sunpy/sunpy#1066
Thomas Robitaille
@astrofrog
Jul 01 2014 13:02
hrm, pip is broken, now they check for certificates it doesn't seem to work behind proxys
Stuart Mumford
@Cadair
Jul 01 2014 13:02
huh
Thomas Robitaille
@astrofrog
Jul 01 2014 13:05
did you get coord_meta to work?
Stuart Mumford
@Cadair
Jul 01 2014 13:07
yes
tho no
in that it works
but it isn't giving me the overlay
Thomas Robitaille
@astrofrog
Jul 01 2014 13:14
why is there no image at the bottom of the notebook?
Stuart Mumford
@Cadair
Jul 01 2014 13:15
god knows
it had a little fit
check now
Thomas Robitaille
@astrofrog
Jul 01 2014 13:17
can you send me the datafile needed?
will try here
shot in the dark: try removing .inverted() when calling the overlay function
Stuart Mumford
@Cadair
Jul 01 2014 13:18
there isn't an inverted
?
it is possible the bug is in the coord transforms
we are still hunting something down in there
Thomas Robitaille
@astrofrog
Jul 01 2014 13:19
ignore me!
data
you need to be on this sunpy branch to run the notebook: sunpy/sunpy#1069
Thomas Robitaille
@astrofrog
Jul 01 2014 13:22
ok, thanks! will try
Thomas Robitaille
@astrofrog
Jul 01 2014 13:32
data is a bit slow to download...
but have installed the branch
weird, SkyCoord(100*u.arcsec, 200*u.arcsec, frame='helioprojective') doesn't work, it says it doesn't know the format
I'm on the VaticanCameos/coordinates-framework branch
Thomas Robitaille
@astrofrog
Jul 01 2014 13:41
@Cadair - I'm fixing a couple of bugs that are preventing the animation script from running
@Cadair - how come imshow is never called in the animation script?
(the image isn't showing up at the moment)
Stuart Mumford
@Cadair
Jul 01 2014 13:49
@astrofrog dosen't it call the map plot
im = mapc[0].plot(axes=ax, extent=None)
on line 145
that is a imshow wrapper
Thomas Robitaille
@astrofrog
Jul 01 2014 13:51
ah yes
not appearing somehow
trying from ipython now
was running from command-line before
the movie works and I see the coordinate lines
just not the image itself
wondering whether it's to do with plt.sci
Thomas Robitaille
@astrofrog
Jul 01 2014 13:57
@Cadair - it's an issue with rotate, after that all the data is set to zero - investigating
apparently this is resetting all the data to zero:
        new_map.data = np.flipud(affine_transform(np.flipud(new_map.data),
                                                  np.array(rmatrix),
                                                  order=order, scale=scale,
                                                  image_center=image_center,
                                                  recenter=recenter, missing=missing,
                                                  use_scipy=use_scipy))
Thomas Robitaille
@astrofrog
Jul 01 2014 14:02
@Cadair - I'm not sure what's causing the issue, but should the script you sent work with sunpy 0.5?
Stuart Mumford
@Cadair
Jul 01 2014 14:03
huh
oh those lines should not be there
delete lines 125 & 126
i.e. the rotate() call and the loop
Thomas Robitaille
@astrofrog
Jul 01 2014 14:08
ahh ok
so no rotation?
Stuart Mumford
@Cadair
Jul 01 2014 14:08
no
that makes wcs axes job way to easy :p
the images are upside down you see
Thomas Robitaille
@astrofrog
Jul 01 2014 14:08
ah I see
so what am I looking at in the image - magnetic field strength?
Stuart Mumford
@Cadair
Jul 01 2014 14:11
yes
LOS magnetic field strength
iirc the z axis is in Gauss
which is a stupid unit
Thomas Robitaille
@astrofrog
Jul 01 2014 14:12
ok
thanks!
Stuart Mumford
@Cadair
Jul 01 2014 14:15
test __init__
the IRC link for this seems to have improved
Thomas Robitaille
@astrofrog
Jul 01 2014 14:18
cool :)
Thomas Robitaille
@astrofrog
Jul 01 2014 15:04
@Cadair - I made a slightly different version: https://www.dropbox.com/s/9cdqrmdtmn03g68/HMI_cropped_wcs_axes_rot.mp4
(quality is poor from dropbox viewer weirdly)
thanks for sending data + script!
Stuart Mumford
@Cadair
Jul 01 2014 15:06
@astrofrog you should use the hmimag colourmap: http://docs.sunpy.org/en/latest/guide/plotting.html#specifying-a-colormap
looks nice tho
Thomas Robitaille
@astrofrog
Jul 01 2014 15:08
ok, will try later :)
will solar physicists kill me if I use the one I used? ;)
Stuart Mumford
@Cadair
Jul 01 2014 15:08
not particularly
they will just look at you funny
!
especially as it is centred on zerp
*zero
Thomas Robitaille
@astrofrog
Jul 01 2014 15:09
ok
will try :)
Is that what it should look like?
Stuart Mumford
@Cadair
Jul 01 2014 15:24
@astrofrog ooo pretty
but no
looks like it is not properly zero centred for some reason.
Thomas Robitaille
@astrofrog
Jul 01 2014 15:36
Hmm, it is zero centered, but maybe the width is wrong? Should there be more green/yellow or less of it?
I have to run, but will drop by here later - let me know if you see what is wrong
Stuart Mumford
@Cadair
Jul 01 2014 15:42
@astrofrog can you send me the code?>
der
that is the code!!
@astrofrog what is wrong is you changed the colour map limits
that colourmap is scaled for the physical units of the instrument
Thomas Robitaille
@astrofrog
Jul 01 2014 16:46
@Cadair - oh, but it was flickering
maybe I can use the smallest min and the largest max. Will try
what are the limits of the instrument?
at the moment it's asymmetric
i.e. if I use the min/max it's asymmetric