sunpy icon indicating copy to clipboard operation
sunpy copied to clipboard

Add support for ASDF in Map Factory and .save method

Open Cadair opened this issue 1 year ago • 4 comments

Describe the feature

@wtbarnes asks:

Is there a reason we couldn’t add asdf as a supported format in the map factory?

If we add support to map factory the questions that needs answering are how far down the asdf tree do we look for map objects to return? (Top level only? all of them?) and what do we do if we open a file with more than just the map object in? (Ignore it? Throw a warning?)

On the .save method side it would be easy enough to "if filename ends with .asdf make a tree and save it" although this would arguably move the asdf dependency into the map extra.

Proposed solution

No response

Cadair avatar Jun 25 '24 06:06 Cadair

hey, can I be assigned for this feature?

  1. for tree we can do a recursive search for entire ASDF tree to find map objects and maybe we have to make function to read asdf file

Sauravroy34 avatar Jul 03 '24 12:07 Sauravroy34

hey @Sauravroy34 thanks for being interested in working on this. We generally don't assign issues to people, the best way to show people you are working on something is to open a draft PR as soon as you have started.

I think as a first pass we should tackle either save or load, save is probably easier, so if you aren't familiar with sunpy's code and contribution process I would start there.

Cadair avatar Jul 03 '24 12:07 Cadair

Sure, will be sending a pr soon

Sauravroy34 avatar Jul 03 '24 12:07 Sauravroy34