Closed tsengj10 closed 2 years ago
Thanks @mcolomermolla for the comments. One question: didn't Dan's plot have ra=0 at the left edge? Mine has ra=0 at the center (though I have to check that sign again)
If the truth position I run is ra=-60 and dec=-30, and in your plot ra=0 is in the center, the negative RA should be on the left of the plot, not on the right as in the output obtained. The one by Dan is in the right place for ra<0 left ra=0 center and ra>0 right. attached the one I obtained, for the truth position mentioned (close to Galactic Center), it should be "mirrowed":
When I look at Dan (et al)'s plot, I see RA of 0h on the left edge, then reading from left to right, 21h, 18h, 15h, all the way back to 0h on the right edge. I was under the impression that 0h would correspond to 0 degrees, but that might be too naive.
In any case, maybe we should move to use the ligo.skymap package.
As for the left/right order, this is controllable via the "flip" flag in healpy.mollview. According to the healpy.mollview docs, the default is the "astro" view, which has "east toward left, west toward right". The "geo" view is the other way around. I think this is because the skymap has south pole at the bottom, and the north pole at the top; if you look at the night sky with this orientation, then east is toward the left. (This seems to be what I get from stellarium, too.)
Added a csv file for configuration.
It turns out healpy.mollview doesn't offer axis labels; it's apparently a long-standing issue. Probably another reason to move towards ligo.skymap.
Database lookup of sigma and bias removed from DiffPointing. @mcolomermolla is right - it should come from the experiments, or is something we need to calculate ourselves upstream.
Changed Mollview option to declare "celestial" coordinate system; I had mistakenly put in a "G", which indicates a galactic, sun-centric coordinate system. Doesn't really change the output, because all the calculations were done in the celestial coordinate system.
As found by @dallaval5u in #61, we were using data['gen'] in two different ways. I've moved truth information to data['truth']
I think that's it. This should go in because there's more to come in another PR!
DiffPoint takes simple time differences and points to the supernova. astropy is used to convert the Earth locations of the detectors into geocentric celestial coordinates at the time of observation.
This PR also includes DetectorDB, which reads the detector database file (such as detector_locations.csv) once. Modules can instantiate DetectorDB and then get Detector objects out of it.
GenPoint was a simple SN direction-to-times generator for testing. Its logic should migrate into the other generator code.
You can test GenPoint/DiffPoint with "make diffpoint". It will create a mollview skymap.