This notebook shows
(1) how to use ztfquery
to obtain the corners of the ZTF quadrants needed to interpret the
observation_library
for sim_survey
. To run this notebook, you will need to have ztfquery
installed
and setup
(2) How to use these in a simulation.
In [1]:
from ztfquery import ccd
df = ccd.CCDQUADLAYOUT
df.rename(columns=dict(Quad='rcid', CCD='ccd'), inplace=True)
df.ccd = df.ccd -1
df.rcid = df.rcid + 1
df.ccd.unique()
Out[1]:
In [2]:
df = df[['EW', 'NS', 'rcid']].rename(columns=dict(rcid='CCD'))
In [3]:
df.head()
Out[3]:
In [4]:
df.CCD.unique()
Out[4]:
This was used to create the file containing the corners.
df.to_csv('data/ZTF_corners_rcid.txt', index=False)
In [5]:
from simsurvey_tools import load_ztf_ccds
In [6]:
len(load_ztf_ccds(filename='data/ZTF_corners_rcid.txt', num_segs=64))
Out[6]:
In [7]:
# But really these are ccd quadrants
ccds = load_ztf_ccds(filename='data/ZTF_corners_rcid.txt', num_segs=64)