These are chat archives for astropy/astropy

2nd
Jul 2014
Stuart Mumford
@Cadair
Jul 02 2014 09:32
@astrofrog you about?
Thomas Robitaille
@astrofrog
Jul 02 2014 09:38
@Cadair - yep!
Stuart Mumford
@Cadair
Jul 02 2014 09:38
iirc you want to sace +/- 4500
*scale
Thomas Robitaille
@astrofrog
Jul 02 2014 09:39
ok cool, will try!
Stuart Mumford
@Cadair
Jul 02 2014 09:40
@astrofrog nope, +/- 1500
Thomas Robitaille
@astrofrog
Jul 02 2014 09:40
btw did you get a chance to try the astropy 0.4rc1 with sunpy? any issues?
Thomas Robitaille
@astrofrog
Jul 02 2014 09:40
ok, thanks!
Stuart Mumford
@Cadair
Jul 02 2014 09:40
I was going to try that today
Thomas Robitaille
@astrofrog
Jul 02 2014 09:40
ok, if it works just reply to the original email erik b sent out so he has some data on success/failure
Stuart Mumford
@Cadair
Jul 02 2014 09:40
ok
Thomas Robitaille
@astrofrog
Jul 02 2014 09:41
color-wise
wait that's not the right one in the preview above
Stuart Mumford
@Cadair
Jul 02 2014 09:41
yes
Thomas Robitaille
@astrofrog
Jul 02 2014 09:42
(follow the link to dropbox)
ok so the background is mostly gray
Stuart Mumford
@Cadair
Jul 02 2014 09:42
yeah I am on the link
it looks correct
Thomas Robitaille
@astrofrog
Jul 02 2014 09:42
thanks!
now will try and see if I can save it as lossless
Stuart Mumford
@Cadair
Jul 02 2014 09:43
@astrofrog, I normally just ramp up the bitrate!
Thomas Robitaille
@astrofrog
Jul 02 2014 09:46
ok, that seems to work too
Thomas Robitaille
@astrofrog
Jul 02 2014 09:59
@Cadair - does this look right now? https://www.dropbox.com/s/1ty248p55hogy0y/HMI_cropped_wcs_axes_rot_hmimag.mp4 - it's 1/10 of full rate, but if I go higher it jitters too much for my liking
Stuart Mumford
@Cadair
Jul 02 2014 10:00
still looks like low bitrate to me?
why does it jitter?
Thomas Robitaille
@astrofrog
Jul 02 2014 10:01
dropbox downsamples the bitrate for some reason
you have to download to see full-res
not sure about the jitter, I guess I mean that it's harder to see the overall motion as it moves too slowly
for the purpose of the talk, 1/10 is good
not a fan of the colormap, but I guess it's more 'correct' ;)
Stuart Mumford
@Cadair
Jul 02 2014 10:08
@astrofrog, any zero centered colourmap will work
like coolwarm ro sthg
Thomas Robitaille
@astrofrog
Jul 02 2014 10:09
ok cool, will try :)
Stuart Mumford
@Cadair
Jul 02 2014 10:10
@astrofrog, you got time to help us debug that coords wcsaxes thing?
Thomas Robitaille
@astrofrog
Jul 02 2014 10:11
yep!
ok, so what's the current status?
Stuart Mumford
@Cadair
Jul 02 2014 10:11
astrofrog, pretty much where it was yesterday
Thomas Robitaille
@astrofrog
Jul 02 2014 10:11
ok let me pull it up again
this requires to be on the sunpy fork right?
Stuart Mumford
@Cadair
Jul 02 2014 10:12
yeah
Thomas Robitaille
@astrofrog
Jul 02 2014 10:19
Hmm, can you send hmi_m_45s_2014_03_01_00_01_30_tai_magnetogram_fits?
sorry ignore me
no I do need it
confused ;)
Stuart Mumford
@Cadair
Jul 02 2014 10:20
I sent you that link yesterday, did it download?
Thomas Robitaille
@astrofrog
Jul 02 2014 10:21
ah yes let me check
sorry, not with it
Stuart Mumford
@Cadair
Jul 02 2014 10:22
@astrofrog, I popped one in the FTP server anyway
Thomas Robitaille
@astrofrog
Jul 02 2014 10:22
yep, I have it
Pritish Chakraborty
@PritishC
Jul 02 2014 10:23
@eteq, @taldcroft: If I recall correctly, there was going to be a provision for frame class attributes (not FrameAttribute instances) to have a default values setting via _frame_specific_representation_info. If so, is this idea still being worked on? Without it, having to default an attribute to a value in a custom constructor is not very efficient.
Thomas Robitaille
@astrofrog
Jul 02 2014 10:23
it doesn't even work for me, I get TypeError: lon should be a Quantity, Angle, or Longitude
Stuart Mumford
@Cadair
Jul 02 2014 10:23
astrofrog, re-pull the branch
Thomas Robitaille
@astrofrog
Jul 02 2014 10:23
which one, wcsaxes or sunpy
Stuart Mumford
@Cadair
Jul 02 2014 10:23
we should have fixed that
sunpy
Thomas Robitaille
@astrofrog
Jul 02 2014 10:24
no, I'm still seeing it
Stuart Mumford
@Cadair
Jul 02 2014 10:25
huh
Thomas Robitaille
@astrofrog
Jul 02 2014 10:25
with the coordinates-framework branch of sunpy, your sunpy_coord_frame branch of wcsaxes, and latest astropy
I may not have the latest script though
Thomas Robitaille
@astrofrog
Jul 02 2014 10:28
Ah I see the error only if I do savefig
not plt.show
(not using the notebook, for debugging
Stuart Mumford
@Cadair
Jul 02 2014 10:28
well that's odd
Thomas Robitaille
@astrofrog
Jul 02 2014 10:29
ok, will look into it now
Stuart Mumford
@Cadair
Jul 02 2014 10:30
@astrofrog, I am getting the same thing here when I run it as a script
this must be why it isn't displaying
Thomas Robitaille
@astrofrog
Jul 02 2014 10:30
I'm investigating
ah I think I know
it's not finding helographicstonyhurst in the transform graph somehow
Thomas Robitaille
@astrofrog
Jul 02 2014 10:35
there's a typo ;)(
;)
helio not helo
Stuart Mumford
@Cadair
Jul 02 2014 10:36
ffs!!
I still get it
Thomas Robitaille
@astrofrog
Jul 02 2014 10:36
still more errors though, looking into it
I also had to fix things in wcsaxes
hang on tight
Thomas Robitaille
@astrofrog
Jul 02 2014 10:41
in helioc_to_heliop, is it normal that zeta can be negative?
SphericalRepresentation doesn't allow negative distances by default so that is causing issues
Stuart Mumford
@Cadair
Jul 02 2014 10:42
astrofrog, yes, negative zeta is a sphere further away than the solar centre
zeta = 0 bisects the solar centre
Thomas Robitaille
@astrofrog
Jul 02 2014 10:43
where is the origin of the sphere
Stuart Mumford
@Cadair
Jul 02 2014 10:43
observer
Thomas Robitaille
@astrofrog
Jul 02 2014 10:43
but so the actual distance can't be negative, right? Did you mean to pass distance to the SphericalRepresentation?
at the moment you are passing zeta for the distance
Stuart Mumford
@Cadair
Jul 02 2014 10:43
we were using distance as zeta
which I suppose is counter intuative
@VaticanCameos, wakey wakey
Thomas Robitaille
@astrofrog
Jul 02 2014 10:44
ok, but in SphericalRepresentation distance=0 is the observer
Stuart Mumford
@Cadair
Jul 02 2014 10:44
hmmm yes
Thomas Robitaille
@astrofrog
Jul 02 2014 10:44
you could of course create a different representation
but the assumptions made there are that distance=0 is the origin
in the mean time I'll push the wcsaxes fixes
Stuart Mumford
@Cadair
Jul 02 2014 10:45
is there the logic in frames to run a conversion from the representation to the coordinate?
Thomas Robitaille
@astrofrog
Jul 02 2014 10:45
hmm
not sure
Stuart Mumford
@Cadair
Jul 02 2014 10:45
not that I can think of, which means a custom representation might be the only way to go.
which would suck
Pritish Chakraborty
@PritishC
Jul 02 2014 10:46
Hey, it's still better than what we have right now
Stuart Mumford
@Cadair
Jul 02 2014 10:46
VaticanCameos, we would still have to have the default value stuff
Pritish Chakraborty
@PritishC
Jul 02 2014 10:46
But yes, a RepresentationMapping accommodation would've been the best thing
Stuart Mumford
@Cadair
Jul 02 2014 10:46
This is a bit of a different problem
Thomas Robitaille
@astrofrog
Jul 02 2014 10:47
You can write your own representation class and have it auto-connect to the other representation classes
Stuart Mumford
@Cadair
Jul 02 2014 10:47
in that the SphericalRepresentaion assumes the distance is distance from the origin
logically enough
@astrofrog @VaticanCameos I wonder if a custom representation is logically correct
distance is just D0 - zeta
Thomas Robitaille
@astrofrog
Jul 02 2014 10:50
You could also inherit from SphericalRepresentation and just have a zeta attribute that can be computed on-the-fly
Stuart Mumford
@Cadair
Jul 02 2014 10:50
@astrofrog can we do that in the frame?
Thomas Robitaille
@astrofrog
Jul 02 2014 10:50
so you want to do frame.zeta?
Stuart Mumford
@Cadair
Jul 02 2014 10:51
well really we want the thrid coordinate in the frame to be zeta
Thomas Robitaille
@astrofrog
Jul 02 2014 10:51
hmm
Stuart Mumford
@Cadair
Jul 02 2014 10:51
so that it prints as zeta
etc
Thomas Robitaille
@astrofrog
Jul 02 2014 10:51
then I think that you want a custom representation
Stuart Mumford
@Cadair
Jul 02 2014 10:52
we could have a custom representation that converts to distance before creating the superclass?
that would require the representation to be passed D0 though
Thomas Robitaille
@astrofrog
Jul 02 2014 10:53
hmm
scratches head
Stuart Mumford
@Cadair
Jul 02 2014 10:53
We could pass the representation 'd' which is distance
PritishC @VaticanCameos wonders if RepresentationMapping could be patched
Thomas Robitaille
@astrofrog
Jul 02 2014 10:54
and D0 is a constant or time dependent
Pritish Chakraborty
@PritishC
Jul 02 2014 10:54
oh wait it doesn't work like that
Thomas Robitaille
@astrofrog
Jul 02 2014 10:54
how did you do that?!
Stuart Mumford
@Cadair
Jul 02 2014 10:54
D0 is observer dependant
Pritish Chakraborty
@PritishC
Jul 02 2014 10:54
I thought it worked like in IRC.
Cadair @Cadair hello
Pritish Chakraborty
@PritishC
Jul 02 2014 10:54
lol
Stuart Mumford
@Cadair
Jul 02 2014 10:54
interesting that that doesn't come through to the IRC client like that
Pritish Chakraborty
@PritishC
Jul 02 2014 10:54
It looks like a broadcast to me.
Stuart Mumford
@Cadair
Jul 02 2014 10:55
@astrofrog it's /me
Thomas Robitaille
@astrofrog
Jul 02 2014 10:55
ok cool
Stuart Mumford
@Cadair
Jul 02 2014 10:55
@vaticancameos
I thin the best idea is to pass 'd' to the representation and make a .zeta
on the frame
Thomas Robitaille
@astrofrog
Jul 02 2014 10:56
so I'm not sure what the best solution is, but if you want the Frame to print out zeta then you could add a zeta property to the frame and customize the repr
__repr__
Pritish Chakraborty
@PritishC
Jul 02 2014 10:56
So what's the consensus? RM can't be patched? Custom representation then?
Thomas Robitaille
@astrofrog
Jul 02 2014 10:56
no, customize the frame
keep the spherical representation
right @Cadair?
Stuart Mumford
@Cadair
Jul 02 2014 10:56
@VaticanCameos the reprentation mapping thing isn't really the solution to this I don't think
Pritish Chakraborty
@PritishC
Jul 02 2014 10:57
Why not? Default values would be the exact thing we need.
Stuart Mumford
@Cadair
Jul 02 2014 10:57
I think that keeping the SphericalRepresentation is important or else other unexpected things can happen
This isn't the default value issue
this is something else
Thomas Robitaille
@astrofrog
Jul 02 2014 10:57
@Cadair @VaticanCameos - you will need to include the fix I just pushed (astrofrog/wcsaxes#71) to WCSAxes to get the script to proceed further than before btw
Stuart Mumford
@Cadair
Jul 02 2014 10:58
cool thanks @astrofrog
Pritish Chakraborty
@PritishC
Jul 02 2014 10:58
o.O
Stuart Mumford
@Cadair
Jul 02 2014 10:59
@VaticanCameos we found a new and different bug
in that we are passing the zeta coordinate to SphericalRepresentation
which breaks when zeta goes negative
Pritish Chakraborty
@PritishC
Jul 02 2014 11:00
Ah
It's bugs galore today it would seem
Stuart Mumford
@Cadair
Jul 02 2014 11:00
because 'distance' in SphericalRepresentation has the origin at the observer
so we should haev 'd' as the third coord in the HelioProjective frame
Thomas Robitaille
@astrofrog
Jul 02 2014 11:01
(back soon)
Stuart Mumford
@Cadair
Jul 02 2014 11:01
so instead of calculating 'd' we should calculate 'zeta'
the only question is what do we want the constructor to do?
I would vote for this:
HelioProjective(Tx, Ty, d)
HelioProjective(Tx=x, Ty=y, zeta=z)
HelioProjective(SphericalRepresentation(Tx, Ty, d))
so that the default is 'd' but 'zeta' can be specified by kwarg
Pritish Chakraborty
@PritishC
Jul 02 2014 11:05
My head hurts from imagining this stuff. About the third case: can I enter only two args in a SphericalRep constructor?
Stuart Mumford
@Cadair
Jul 02 2014 11:05
yes then d defaults to 1AU
well it defaults to D0
Pritish Chakraborty
@PritishC
Jul 02 2014 11:06
@_@
Stuart Mumford
@Cadair
Jul 02 2014 11:06
which defaults to 1AU
oh no
Pritish Chakraborty
@PritishC
Jul 02 2014 11:06
This isn't going to make our code any prettier.
Stuart Mumford
@Cadair
Jul 02 2014 11:06
you can't not in the SphericalRepresentation constructor
Pritish Chakraborty
@PritishC
Jul 02 2014 11:06
Yes I was thinking about that
Stuart Mumford
@Cadair
Jul 02 2014 11:06
only in the Frame
Pritish Chakraborty
@PritishC
Jul 02 2014 11:07
You can't. The defaulting to unitspherical happens in the frame.
Stuart Mumford
@Cadair
Jul 02 2014 11:07
say waht
you have to specify the 3 coords to SphericalRepresentation
Pritish Chakraborty
@PritishC
Jul 02 2014 11:08
As in frameobj.data.class becomes unitspherical if zeta isn't specified in frame args and there is no representation argument.
Stuart Mumford
@Cadair
Jul 02 2014 11:08
we will have to do the current default argument hack to default 'd' to D0 rather than zeta to 0
same thing applies
brb
@VaticanCameos back
Pritish Chakraborty
@PritishC
Jul 02 2014 11:12
You mean you want d as the third arg?
Stuart Mumford
@Cadair
Jul 02 2014 11:13
yes
because that is what SphericalRepresentation expects
Pritish Chakraborty
@PritishC
Jul 02 2014 11:13
Hmm that's going to call for a couple of changes
In tests as well
Stuart Mumford
@Cadair
Jul 02 2014 11:13
yeah, it is a big change
and a little counter-intuative for the user
we will need to add the ability to create the frame from zeta rather than d
and also to get zeta out the frame via property
Stuart Mumford
@Cadair
Jul 02 2014 11:22
@astrofrog I wanted to talk to you about mapping FITS CTYPEs to coordinate frames
because that issue is not a problem exclusive to wcsaxes
We are going to have to think about it for Ginga as well
Thomas Robitaille
@astrofrog
Jul 02 2014 11:27
@Cadair - yes, I think it's something that should go in astropy.coordinates
Stuart Mumford
@Cadair
Jul 02 2014 11:28
yeah that is what I was thinking
Thomas Robitaille
@astrofrog
Jul 02 2014 11:28
i.e. something like frame_from_wcs
a factory function that returns a class
Stuart Mumford
@Cadair
Jul 02 2014 11:28
from my perspective it would work well, I was wondering if there is any ambiguity on the astro side?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:28
and it could make sure to get the equinox right, etc.
Stuart Mumford
@Cadair
Jul 02 2014 11:28
are there multiple frames that could be created from a ctype?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:28
no, I think there are a number of coordinate systems that are well defined in terms of WCS
well, there are certain defaults to assume for things like equinox etc. if not present
ctype is not enough
so e.g.
Stuart Mumford
@Cadair
Jul 02 2014 11:29
but the frame mapping is ctype right/
?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:29
ctype = 'ra--...'
can be FK4, FK5, ICRS, etc.
I think the default should be assumed to be ICRS is RASYS is not present
let me find a list of rules
Stuart Mumford
@Cadair
Jul 02 2014 11:30
what is RASYS?!
MADNESS
ok I think I am seeing that patter
*pattern
Thomas Robitaille
@astrofrog
Jul 02 2014 11:31
anyway, one can write down clear rules
to make WCS -> Frame deterministic
see e.g. the rules here:
in 'Notes'
Stuart Mumford
@Cadair
Jul 02 2014 11:31
so we need a mapping between a WCS object and a Frame class
Thomas Robitaille
@astrofrog
Jul 02 2014 11:31
yes
Stuart Mumford
@Cadair
Jul 02 2014 11:31
where should that live?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:32
I think it should probably live in astropy.coordinates
Stuart Mumford
@Cadair
Jul 02 2014 11:32
we could add a method to the Frame classes that parses a WCS object and determines if it matches that frame
?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:32
I'm not a fan, I'd rather a function that returns the frame needed
Stuart Mumford
@Cadair
Jul 02 2014 11:32
I feel as though it is the frame that should store the information on what WCS objects it represents
Thomas Robitaille
@astrofrog
Jul 02 2014 11:32
otherwise you'd have to try them all to get it to work
Stuart Mumford
@Cadair
Jul 02 2014 11:32
astrofrog, you could have a function that traverses the graph and checks them all
Thomas Robitaille
@astrofrog
Jul 02 2014 11:33
seems inefficient
also the logic for the defaults couldn't be encoded
Stuart Mumford
@Cadair
Jul 02 2014 11:33
not really that much more inefficient
Thomas Robitaille
@astrofrog
Jul 02 2014 11:33
so e.g. both ICRS and FK5 could claim to represent a system with RA--
Stuart Mumford
@Cadair
Jul 02 2014 11:33
the alternative is a butt ton of nested branches
I see your point thouygh
Thomas Robitaille
@astrofrog
Jul 02 2014 11:34
but I think it's preferable, and there aren't that many
branches
Stuart Mumford
@Cadair
Jul 02 2014 11:34
but what about extensibility for things like SunPy?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:34
right we need to think about that
Stuart Mumford
@Cadair
Jul 02 2014 11:34
if the info is not in the Frames you can't add more to the checker
where as if it is in the frame then it can use the graph to check everything that is imported
instead of a method there could be some kind of mapping dict, but that is less flexible
also if we think more in the general sense, a method in the frames allows us to keep the same infrastructure but extend it beyond a WCS object
Thomas Robitaille
@astrofrog
Jul 02 2014 11:39
hmm
need to think about it
Stuart Mumford
@Cadair
Jul 02 2014 11:41
@astrofrog do you know if there is a way to get all the classes on the transform graph?
Thomas Robitaille
@astrofrog
Jul 02 2014 11:41
I don't like the idea of looping over all frames and also it won't handle the defaults well, but I think you are right that the frames should know about it
no
so what about this:
Stuart Mumford
@Cadair
Jul 02 2014 11:41
@astrofrog it's not like there is that many frames to loop ober
Thomas Robitaille
@astrofrog
Jul 02 2014 11:41
when you add a frame to the graph, it registers it as a possible frame for a given CTYPE
Stuart Mumford
@Cadair
Jul 02 2014 11:42
you are never going to break 100
Thomas Robitaille
@astrofrog
Jul 02 2014 11:42
so ICRS says 'I can understand RA--/DEC-
Stuart Mumford
@Cadair
Jul 02 2014 11:42
it's not going to take long
Thomas Robitaille
@astrofrog
Jul 02 2014 11:42
well but you can make it more efficient if each frame declares what CTYPE it understands
in most cases there are no ambiguities so that's fine
Stuart Mumford
@Cadair
Jul 02 2014 11:42
@astrofrog, yeah but also a lot more complex ;)
Thomas Robitaille
@astrofrog
Jul 02 2014 11:42
nah
not that complex!
Stuart Mumford
@Cadair
Jul 02 2014 11:43
what is it going to register that ctype with?
that would require a hook on the transform graph
Thomas Robitaille
@astrofrog
Jul 02 2014 11:43
some kind of dict in the transform graph or on the side
Stuart Mumford
@Cadair
Jul 02 2014 11:43
that seems like a silly place to put it
Thomas Robitaille
@astrofrog
Jul 02 2014 11:43
right, but if you are registering a frame with the transform graph anyway?
hmm
astrofrog @astrofrog thinking
Stuart Mumford
@Cadair
Jul 02 2014 11:44
yeah but this has nothing to do with the graph
Thomas Robitaille
@astrofrog
Jul 02 2014 11:44
yeah
Stuart Mumford
@Cadair
Jul 02 2014 11:44
So in SunPy we have a factory calss
*class
Thomas Robitaille
@astrofrog
Jul 02 2014 11:44
I really don't like the idea of just looping though - how do you get around the issue of multiple frames being valid?
for a given WCS?
Stuart Mumford
@Cadair
Jul 02 2014 11:45
you can register a class with the factory and function that returns True if that factory can handle the data it was passed
that's more complex but possible
Thomas Robitaille
@astrofrog
Jul 02 2014 11:45
yes, but what if several classes say they can handle the data
Stuart Mumford
@Cadair
Jul 02 2014 11:45
so you query the graph and get multiples back
Thomas Robitaille
@astrofrog
Jul 02 2014 11:45
hmm
Stuart Mumford
@Cadair
Jul 02 2014 11:46
then you can have some extra information in the function that queries the graph to resolve the ambiguity
OR
you check the WCS object first, and add any defaults if they don't exist
then you should only get one back
Thomas Robitaille
@astrofrog
Jul 02 2014 11:46
not a bad idea
Stuart Mumford
@Cadair
Jul 02 2014 11:47
you are only taking about a small loop
Thomas Robitaille
@astrofrog
Jul 02 2014 11:47
frames could use a meta-class that auto-registers the ctype
independently of the transform graph
to simplify the loop
Stuart Mumford
@Cadair
Jul 02 2014 11:47
astrofrog, that is a lot of extra implementation
Thomas Robitaille
@astrofrog
Jul 02 2014 11:47
it's actually not too hard
Stuart Mumford
@Cadair
Jul 02 2014 11:47
where as my idea is one extra method on the frame
Thomas Robitaille
@astrofrog
Jul 02 2014 11:48
anyway, it's an optimization
ok, so here's an option
like you said we have from_wcs on frames
if you pass a WCS directly to the frame it interprets it if it can
and doesn't set the defaults
Stuart Mumford
@Cadair
Jul 02 2014 11:48
yep
Thomas Robitaille
@astrofrog
Jul 02 2014 11:49
then there's also a helper function that first sets the defaults to ensure uniqueness
then calls this method on all frames
Stuart Mumford
@Cadair
Jul 02 2014 11:49
yep
Thomas Robitaille
@astrofrog
Jul 02 2014 11:49
step three is optional, and would be to see if one can simplify the loop by only searching for frames that match the CTYPE, but that would just be an optimization
shall I post a message to astropy-dev with our proposal?
Stuart Mumford
@Cadair
Jul 02 2014 11:49
yeah that could be done
you can if you like, or I can if you have other things to do
There is a small optimisation that can be done on step 2
Thomas Robitaille
@astrofrog
Jul 02 2014 11:50
I'll do it now
yup?
Stuart Mumford
@Cadair
Jul 02 2014 11:50
if we can guarantee uniqueness then we can just return on the first match
so we could sort by ctype
Thomas Robitaille
@astrofrog
Jul 02 2014 11:51
true
Stuart Mumford
@Cadair
Jul 02 2014 11:52
well the sorting thing is basically step 3 anyway
I am of the opinion that the optimisation will not be needed.
I reckon it will be fast enough without
Thomas Robitaille
@astrofrog
Jul 02 2014 11:52
ok
Stuart Mumford
@Cadair
Jul 02 2014 11:52
I await being proved wrong!
ah there is a way to get all the frame classes
Thomas Robitaille
@astrofrog
Jul 02 2014 11:58
email sent
Stuart Mumford
@Cadair
Jul 02 2014 11:58
I am cooking something up
Thomas Robitaille
@astrofrog
Jul 02 2014 12:02
awesomez
Adam Ginsburg
@keflavich
Jul 02 2014 12:04
test - I can't see any of the conversation recently mentioned on astropy-dev, and I'm on adium
another test - sorry folks
adium appears to have limited me to 1-way communication; @astrofrog - I see now that you replied to me yesterday, but adium has no record of that. It is very odd.
Stuart Mumford
@Cadair
Jul 02 2014 12:08
@astrofrog I will leave the actual WCS matching functions on the astropy side to you
as I don't understand well enough
#2681
@astrofrog #2681
Thomas Robitaille
@astrofrog
Jul 02 2014 12:15
@keflavich - you can only see the history on gitter I think
@Cadair - thanks for starting this!
Stuart Mumford
@Cadair
Jul 02 2014 12:19
@keflavich do you keep your IRC client running?
Adam Ginsburg
@keflavich
Jul 02 2014 12:19
@cadair - yes. @astrofrog - I have had Adium open at all times, including now, and it shows nothing from the gitter room. It used to
Thomas Robitaille
@astrofrog
Jul 02 2014 12:19
weird
Stuart Mumford
@Cadair
Jul 02 2014 12:19
@astrofrog where should I put that find_wcs_frame function apart from __init__?
Thomas Robitaille
@astrofrog
Jul 02 2014 12:19
maybe they changed their IRC server
Adam Ginsburg
@keflavich
Jul 02 2014 12:19
I think I can still send from adium though (this message is from adium)
Stuart Mumford
@Cadair
Jul 02 2014 12:20
@keflavich I am using the IRC bridge and it is working ok
and yes we can see you
Thomas Robitaille
@astrofrog
Jul 02 2014 12:20
@Cadair - what about creating a utils.py file?
Stuart Mumford
@Cadair
Jul 02 2014 12:20
@astrofrog seemed overkill for one function but I suppose it makes sense
Thomas Robitaille
@astrofrog
Jul 02 2014 12:22
there might be more in future
:)
Stuart Mumford
@Cadair
Jul 02 2014 12:26
@astrofrog, I was thinking, we need a way to make the defaulting plugable as well
but I am not sure how practical that is.
Thomas Robitaille
@astrofrog
Jul 02 2014 12:29
@Cadair - one issue with the current plan is we'll need to wait until 1.0 to benefit from it in WCSAxes
Stuart Mumford
@Cadair
Jul 02 2014 12:29
yeah I know
:(
I would argue we could add the class methods in a a 0.4.1
Thomas Robitaille
@astrofrog
Jul 02 2014 12:29
I feel like we could try and make the WCSAxes version extensible in the mean time
Stuart Mumford
@Cadair
Jul 02 2014 12:29
as it dosen't really change the API :o
but it does really
Thomas Robitaille
@astrofrog
Jul 02 2014 12:29
@Cadair - nah, it does :)
Stuart Mumford
@Cadair
Jul 02 2014 12:30
stupid slow releases
we could hack something together in wcsaxes to replicate the functionality
Thomas Robitaille
@astrofrog
Jul 02 2014 12:30
for WCSAxes, we could simply have a dictionary of functions to call after the current get_coordinate_system if there have been no matches
let me see what I can do
(now)
Stuart Mumford
@Cadair
Jul 02 2014 12:31
we could add a file of frame_wcs functions to wcsaxes
and then dict map them
can you add classmethods to a class seperate to the definition of the class?! o.O
Thomas Robitaille
@astrofrog
Jul 02 2014 12:31
I'm thinking of doing something super easy for now
Thomas Robitaille
@astrofrog
Jul 02 2014 12:37
@Cadair - done!
astrofrog/wcsaxes#72
define a function that takes WCS and returns a Frame or None
then
from wcsaxes.utils import register_coordinate_system_identifier
register_coordinate_system_identifier(your_function)
make sure you return None if there are no matches
can you test it out?
Stuart Mumford
@Cadair
Jul 02 2014 12:39
that works
Thomas Robitaille
@astrofrog
Jul 02 2014 12:40
problem solved ;)
ok, need to add tests and docs, but will do that later
Stuart Mumford
@Cadair
Jul 02 2014 12:40
hang on I am still testing it
Thomas Robitaille
@astrofrog
Jul 02 2014 12:40
ok sorry :)
Stuart Mumford
@Cadair
Jul 02 2014 12:40
that was some bad english on my part there
Thomas Robitaille
@astrofrog
Jul 02 2014 12:41
hehe
Stuart Mumford
@Cadair
Jul 02 2014 12:43
Boom!
Thomas Robitaille
@astrofrog
Jul 02 2014 12:44
boom it worked, or boom it crashed?
you're going to have to be less ambiguous here! ;)
Stuart Mumford
@Cadair
Jul 02 2014 12:44
it worked
try that on your wcsaxes branch and the sunpy coords branch
Thomas Robitaille
@astrofrog
Jul 02 2014 12:47
is the zeta issue fixed?
Stuart Mumford
@Cadair
Jul 02 2014 12:49
no not yet
but it works because it finds the class to do the transform
I assume
Thomas Robitaille
@astrofrog
Jul 02 2014 12:54
the overlay doesn't work in the notebook you sent though, right?
Stuart Mumford
@Cadair
Jul 02 2014 13:00
yeah
that's our bug
Thomas Robitaille
@astrofrog
Jul 02 2014 13:01
ok cool
Stuart Mumford
@Cadair
Jul 02 2014 14:06
@astrofrog snap
Thomas Robitaille
@astrofrog
Jul 02 2014 14:39
@Cadair - what's up?
Stuart Mumford
@Cadair
Jul 02 2014 14:39
@astrofrog ah just that we both responded to Perry's email at the same time!
Adam Ginsburg
@keflavich
Jul 02 2014 14:39
Anyone interested: astroquery's active on gitter now too https://gitter.im/astropy/astroquery
Thomas Robitaille
@astrofrog
Jul 02 2014 14:56
@keflavich - cool!
This message was deleted
@Cadair - any luck with squashing the sunpy coords bug?
Stuart Mumford
@Cadair
Jul 02 2014 14:57
I have my @VaticanCameos minion working on it :p
Thomas Robitaille
@astrofrog
Jul 02 2014 14:57
ok cool :)
Stuart Mumford
@Cadair
Jul 02 2014 14:58
it is quite complex
we are going to have to do some funky arg parsing
Thomas Robitaille
@astrofrog
Jul 02 2014 14:58
I might release a first 'stable' WCSAxes version later today or tomorrow, for people to try at SciPy
your older scripts with sunpy master work, right?
Stuart Mumford
@Cadair
Jul 02 2014 14:58
I think so, I haven't tested
Thomas Robitaille
@astrofrog
Jul 02 2014 14:58
ok cool
Thomas Robitaille
@astrofrog
Jul 02 2014 15:07
@Cadair - just in case it's easy: I have a file called aia.lev1.171A_2012-01-16T17_30_00.34Z.image_lev1.fits that you sent me a while back. Is it easy to access a time series of this data online?
Stuart Mumford
@Cadair
Jul 02 2014 15:11
my irc link seems to have broken:

<Cadair> yeah pretty easy

<Cadair> http://docs.sunpy.org/en/latest/guide/acquiring_data/vso.html

<Cadair> you want:

<Cadair> >>> qr = client.query(vso.attrs.Time('2012/1/16', '2012/1/17'), vso.attrs.Instrument('aia'), vso.attrs.Wave(171,171), vso.attrs.Sample(10*60))

<Cadair> which will give you 10 min cadence for a day

<Cadair> I think

<Cadair> I hope

Thomas Robitaille
@astrofrog
Jul 02 2014 15:14
@Cadair - is there a way to set the resolution?
e.g. 1024
Stuart Mumford
@Cadair
Jul 02 2014 15:14
stupid IRC
no
you only get full 4098^2 images :D
Thomas Robitaille
@astrofrog
Jul 02 2014 15:15
ok
np
Stuart Mumford
@Cadair
Jul 02 2014 15:15
ALL THE PIXELS
@astrofrog is there a way to set image size in pixels in a WCS object
Cadair @Cadair thinks that having intersphinx in the markdown in this chat would be uber epic
Thomas Robitaille
@astrofrog
Jul 02 2014 15:19
@Cadair - no, WCS is independent of pixel size
sorry
image size
Stuart Mumford
@Cadair
Jul 02 2014 15:20
cool
Thomas Robitaille
@astrofrog
Jul 02 2014 15:22
is the fact you can't specify the image size for VSO due to sunpy or the archive limitations?
Stuart Mumford
@Cadair
Jul 02 2014 15:22
archive
all the archives generally only provide data at detector resolution
iirc
Thomas Robitaille
@astrofrog
Jul 02 2014 15:23
ok cool
that's a lot of data!
Stuart Mumford
@Cadair
Jul 02 2014 15:23
yes, yes it is
you might want to increase the sample size
Thomas Robitaille
@astrofrog
Jul 02 2014 15:23
trying to download 1 month of data at 1h cadence :)
might go have dinner
while it runs!
Stuart Mumford
@Cadair
Jul 02 2014 15:24
yeah it is a lot of data!!
Thomas Robitaille
@astrofrog
Jul 02 2014 15:25
I'm going to make a rotating movie with WCSAxes
i.e. rotate the sun around
Stuart Mumford
@Cadair
Jul 02 2014 15:25
why can I not update my FITS header with the output of WCS.to_header()
@astrofrog what do you mean?
i.e. see the sun rotating?
Thomas Robitaille
@astrofrog
Jul 02 2014 15:26
yeah!
Stuart Mumford
@Cadair
Jul 02 2014 15:26
nice!
Thomas Robitaille
@astrofrog
Jul 02 2014 15:26
weird, you should be able to upadte the header
what's the error?
brb
Stuart Mumford
@Cadair
Jul 02 2014 15:26
file1[1].header.update(w2.wcs.to_header())
ERROR: ValueError: Header update sequence item #0 is invalid; the item must either be a 2-tuple containing a keyword and value, or a 3-tuple containing a keyword, value, and comment string. [astropy.io.fits.header]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/astropy/io/fits/header.py", line 1154, in update
    'a keyword, value, and comment string.' % idx)
ValueError: Header update sequence item #0 is invalid; the item must either be a 2-tuple containing a keyword and value, or a 3-tuple containing a keyword, value, and comment string.
Thomas Robitaille
@astrofrog
Jul 02 2014 15:26
Hmm, right, I don't think that will work
not sure what the alternative is
Stuart Mumford
@Cadair
Jul 02 2014 15:27
it's not critical at the moment
Stuart Mumford
@Cadair
Jul 02 2014 15:44
I am happy
I am combining scikit-image and wcs to do awesome things
Thomas Robitaille
@astrofrog
Jul 02 2014 15:47
cool :)