0
Respuestas
Is there a way to plot your own MOCs?
Hi Guys.
I have been trying to figure out if it is possible to supply a MOC as an python object or a FITS file and plot it in the pyesasky display?
So far I have not had luck with it, perhaps I am looking the wrong places.
If this is not possible yet I would encourage that as method to develop, and perhaps also add one allowing for basic overlap checking with the built-in MOCs.
cheers
Jonas
Servicio de atención al cliente por UserEcho
Hi Matthias
Brilliant, thank you very much!
I have been using the mocpy module to access/manipulate MOCs so far and that one seems to happy to serialize into both strings and JSON, so that sounds like a good fit to me.
cheers
Jonas
Hi Jonas,
I've uploaded a new version now to pypi and npm; 1.4.2
pip install pyesasky==1.4.2
and jupyter labextension install pyesasky@1.4.2 will do the installations.
The syntax is like this:
esasky.overlayMOC(mocstring, name, color, opacity)
esasky.removeMOC(name)
E.g.
esasky.overlayMoc('6/2-15 23 554 7/22 50-75', 'myMoc', 'blue', 0.2)
esasky.overlayMoc('{"3":[1,2,3,4,5], "4":[2,3,4]}', 'myMoc', '#FF1244', 1) Opacity 1 gives only the edges
esasky.removeMOC('myMoc')
There seems to be a small bug in AladinLite for MOCs in Ipix 0 for order 3 when zoomed out quite a bit. I'll try to have a look at that a bit later but hopefully it shouldn't interfere too much.
Have a look and see if fits what you were looking for.
Best regards
Mattias
Hi Jonas,
Good point. We definitely should have this. Actually not too much work to implement it. I'm working on it right now. My plan was to implement it so you supply a JSON MOC or string serialization as in the IVOA description 2.3.2 and 3.1: http://ivoa.net/documents/MOC/20191007/REC-MOC-1.1-20191007.pdf What do you think about that?
I'll try to finish that today and release a new pyESASky version.
Best regards
Mattias
ESASky team