Insert image into map sequence

43 views
Skip to first unread message

Richard Morton

unread,
Jan 13, 2021, 5:31:54 AM1/13/21
to SunPy
Hi,

I am looking at using Maps to work with data from the CoMP instrument.

I think that I want to read the image sequences in with a Map Sequence. However as part of my current CoMP data processing pipeline there is an section of the code that finds missing frames and creates them.

So my question is, once a Map sequence is created, is is possible to insert an image (along with meta data) into the sequence?

Thanks.

Richard Morton

unread,
Jan 13, 2021, 11:19:57 AM1/13/21
to SunPy
Don't worry, I have figured it out!

DavidPS

unread,
Jan 13, 2021, 2:34:12 PM1/13/21
to SunPy
Hi Richard,

it would be great if you could share with the rest of us how you solved it. That will help future users who search in the forum something similar.

David

Richard Morton

unread,
Jan 14, 2021, 3:51:34 AM1/14/21
to SunPy
Apologise, bad ettiequte from myself.

Whether it's a solution or a hack is to be seen.

I decided it would probably suffice to: 
* turn the Map Sequence object back to the list of maps
* use the insert attribute of lists to place the new frame (converted to a Map object) in the desired location
* then covert back to a Map Sequence.

Maybe there is some unnecessary overhead in this. So if there is a cleaner way, I would also like to hear it. 

Stuart Mumford

unread,
Feb 18, 2021, 9:48:01 AM2/18/21
to su...@googlegroups.com
Hi Richard,

The MapSequence object has a `.maps` property which is a list of the
underlying maps so you should be able to insert it into that.

Stuart
Reply all
Reply to author
Forward
0 new messages