Hi @ljones and @yoachim - what is currently the best way to spatially select OpSim output by regions in Galactic coordinates within sims_maf? My use-case is that I would like to compute summary metrics for subsets of the OpSim output that are spatially selected as well as by e.g. filter.
Since the field centers (ra, dec) are included in OpSim output, I think the way to do this would involve reading in the field centers and using astropy.coords to transform to Galactics, form a Boolean for the rows that survive the selection by region, and pass those to the summary metric computation… but I’m not entirely clear at what stage the selection takes place when computing summary metrics (i.e. where the user gets to apply the boolean thus defined).
Any help would be much appreciated, I wrote a horrible fudge in a notebook a couple of years ago that basically generates a duplicate set of co-ordinates from the HEALPIX and then requires the row ordering be identical, which I’d really rather not have to use again!
Thanks,
Will