Making Flat data

There are two types of Flat data. One is dome Flat which is observed by illuminating a screen or wall. The other is night sky Flat which is made from on-source data. Here we introduce how to make dome Flat, because HSC observations mainly use it. If you want to make night sky Flat, please see the page of Making night sky Flat.

Flat data is made from dome Flat (Flat raw data) by removing an overscan, and subtracting Bias and Dark data. In HSC pipeline, at first, the mean value of an overscan is subtracted from Flat raw data of each [visit, CCD]. Then, we can obtain final Flat data by subtracting Bias and Dark data, respectively. It will be done by HSC pipeline command of reduceFlat.py.

# Making Flat data
reduceFlat.py $home/hsc --calib=$home/hsc/CALIB --rerun=calib_dith_16h_flat --id visit=902690..902704:2 --detrendId calibVersion=all

# Usage:
#   reduceFlat.py <a directory for data reduction> --calib=<a directory for detrend data> --rerun=<rerun name> --id visit=<visit ID of Flat raw data> --detrendId --detrendId calibVersion=<version for making detrend>

Warning

You must make Flat data for each filter. For example, if you use i-band and r-band, you need to make i-band and r-band Flat data, respectively.


Once you perform reduceFlat.py you can find following data in your repository. Final Flat and intermediate data is produced in $home/hsc/CALIB and $home/hsc/rerun/[rerun], respectively.

  • Flat data                           :FLAT-[ccd].fits in $home/hsc/CALIB/FLAT/[dateObs]/[filter]/[calibVersion]/
  • A result of overscan subtraction for each [visit, ccd] Flat raw data:oss-[visit]-[ccd].png in $home/hsc/rerun/[rerun]/[pointing]/[filter]/thumbs/
  • A result of flattened by Flat data for each [visit, CCD]      :flattened-[visit]-[ccd].png in $home/hsc/rerun/[rerun]/[pointing]/[filter]/thumbs/
  • Flat data for each [visit, CCD]                 :c[ccd].fits in $home/hsc/rerun/[rerun]/postISRCCD/v[visit]-f[filter]/

Flat raw data (left) and Flat data produced by reduceFlat.py (right) are shown in Figure 3. Flat data is slightly smaller than Flat raw data as is the case with Bias and Dark data, because overscan and prescan regions are removed from Flat raw data.

../_images/flat_raw_1_new.png

Fig 3: (Left) Flat raw data, and (right) Flat data produced in reduceFlat.py.


After you confirm your Flat data, you must register the data to a registry

# Registering Flat data to calib-registry
genCalibRegistry.py --root=$home/hsc/CALIB --camera=HSC --validity=1000

Now we prepare all detrend data. Let’s check a calib-registry whether we do not forget to register of detrend data.

sqlite> .table                          # display the table contents
        bias    dark    flat    fringe

sqlite> select * from bias      # select header information of Bias data
   ...> group by ccd;           # display in order of ccd


# search results
#
id    validStart     vali  cali  filt  calibVersion   cc
----  -------------  ----  ----  ----  -------------  --
90    2010-09-20     2016-03-12  2013-06-16  NONE  all  0
61    2010-09-20     2016-03-12  2013-06-16  NONE  all  1
...

It is ok to confirm that all detrend data of Bias, Dark, and Flat data is registered in a calib-registry (see Figure 4). Note that if you type select * from fringe, you can get no response. Because we do not make Fringe data.

../_images/sqlite3_calib.png

Fig 4: Search results of calib-registry by sqlite3.