Open mcoughlin opened 2 years ago
The following is already inplemented:
import pandas
from skysurvey import survey
pointing = [{"fieldid":450, "mjd":56000, "band":"ztfr", "skynoise":2, "gain":1, "zp":25},
{"fieldid":541, "mjd":56000, "band":"ztfr", "skynoise":2, "gain":1, "zp":25}]
pointing = pandas.DataFrame(pointings)
s = survey.Survey.from_pointings(pointing,
fieds={450:"box(50,30, 3,4,0)", 541:"ellipse(190,-10,1.5,1,50)"})
fields here are "region" strings, but you could also provide a "Region" object (or any shapely object)
@MickaelRigault i guess what I mean is just providing the shape once and letting the code figure out how they propagate based on the field centers.
Ah, I see.
Would you like to provide centroid_list
plus field_shape
at while loading the survey or you think you don't know yet the centroid while loading and provide the centroid_list later on ?
I think we should let the user provide a list of fields (a la ZTF) and the region and it knows how to make the field list.
@MickaelRigault Sorry I completely lost track of this, did this happen?
I think survey should take a "region" or similar argument that propagates that region (or Moc) or whatever to the fields with a given field center, i.e. how we do it here:
https://github.com/skyportal/skyportal/blob/main/skyportal/handlers/api/instrument.py#L740