Data Reduction Pipeline for Imaging Data

Overview

SWIMS Imaging Data Reduction Pipeline, written in Python, processes SWSB*/SWSR* FITS data to produce a final stacked image in a standard manner.

Reduction Flow Chart
flowchart.png

Download

Core scripts

FileContents
fileswsred_20210131.tgzPython core scripts (swsred/*py) and configuration/utility files

BPM

FileContents
fileswsred_calib_bpm_s18a_20210131.tgzBad pixel mask files for S18A data
fileswsred_calib_bpm_s18b_20210131.tgzBad pixel mask files for S18B data
fileswsred_calib_bpm_s20b_20210131.tgzBad pixel mask files for S20B data

Mosaic

FileContents
fileswsred_calib_mosaic_s18a_20210131.tgzMosaic parameter files for S18A data
fileswsred_calib_mosaic_s18b_20210131.tgzMosaic parameter files for S18B data

Flat

BBF: Broad-band filters, MBF: Medium-band filters, NBF: Narrow-band filters

FileContents
fileswsred_calib_flat_bbf_s18a_20210131.tgzFlat files for S18A BBF data
fileswsred_calib_flat_bbf_s18b_20210131.tgzFlat files for S18B BBF data
fileswsred_calib_flat_mbf_s18b_20210131.tgzFlat files for S18B MBF data
fileswsred_calib_flat_nbf_blue_s18b_20210131.tgzFlat files for S18B Blue NBF data
fileswsred_calib_flat_nbf_red_s18b_20210131.tgzFlat files for S18B Red NBF data
fileswsred_calib_flat_bbf_s20b_20210131.tgzFlat files for S20B BBF data

Installation

prerequisites

SWSRED requires the following python packages and astrOmatic softwares.

PackageTested version
Python2.7.173.7.7
astropy2.0.94.0
numpy1.16.61.18.1
scipy1.2.11.4.1
matplotlib2.2.33.1.3
sextractor2.19.52.19.5
scamp2.7.82.7.8
swarp2.38.02.38.0

Also, Internet connection is required during reducing data to access Pan-STARRS/2MASS catalogs.

Install SWSRED

  1. Download SWSRED files you need.
  2. Extract all the tar balls on a directory you want.
    % cd SWSRED_DIRECTORY
    % tar xvf swsred_20210131.tgz
    % tar xvf swsred_calib_bpm_s18a_20210131.tgz
    % tar xvf swsred_calib_bpm_s18b_20210131.tgz
    % tar xvf swsred_calib_bpm_s20b_20210131.tgz
    % tar xvf swsred_calib_mosaic_s18a_20210131.tgz
    % tar xvf swsred_calib_mosaic_s18b_20210131.tgz
    % tar xvf swsred_calib_flat_s18a_20210131.tgz
    % tar xvf swsred_calib_flat_s18b_20210131.tgz
    % tar xvf swsred_calib_flat_s20b_20210131.tgz
    
  3. set PYTHONPATH to SWSRED_DIRECTORY.
    % export PYTHONPATH="SWSRED_DIRECTORY:${PYTHONPATH}
    

Usage

SWSRED has no documentations yet, but you can use a dirty script 'swsred/reduce_all.py' as a quick tutorial to learn how to use the software.

Be sure to use SWSRED within python (e.g., in ipython or jupyter, etc.), not via the command line.

Here is a quick introduction to use SWSRED.

  1. First of all, prepare a list of input FITS files including absolute paths as a python 'array-like' (list, tuple, or numpy array) object, for example as follows.
    > import glob
    > in_arr1 = glob.glob("DATA/PATH/SWSB*1.fits")  # blue chip1 data 
    
    • Note that as shown in the flow chart above, data of chip1 and chip2 have to be reduced separately.
  2. Make filenames of intermediate files.
    > import swsred.make_file_lst
    > file_lst1 = swsred.make_file_lst.make_file_lst(in_arr1)
    
    • 'file_lst1' is a dictionary which defines various filenames such as flat-fielded FITS filename. You can edit any values as you want.
      • For example, you get the following result with an input ["data/path/SWSB00000001.fits"] as in_arr1,
        KeyValueDescription
        indata/path/SWSB00000001.fitsinput filename
        ffffSWSB00000001.fitsfilename of flat-fielded data
        msmsSWSB00000001.fitsfilename of self-sky data
        ssssSWSB00000001.fitsfilename of sky-subtracted data
        wcwcSWSB00000001.fitsfilename of WCS-corrected data
        bpm/SWSRED_DIRECTORY/calib/bpm_sXXY_b1.fitsfilename of Bad-pixel mask (XXY denotes a semester)
        whtSWSB00000001_wht.fitsfilename of weight map (created by make_weight_map module)
        omskSWSB00000001_omsk.fitsfilename of object mask
        ldacssSWSB00000001.ldacfilename of SExtractor LDAC catalog
        asciissSWSB00000001.asciifilename of SExtractor ASCII catalog
        headssSWSB00000001.headfilename of SExtractor HEAD file
  1. Then, start your data reduction. For example, to perform flat-fielding,
    > import swsred.flat_field
    > swsred.flat_field.flat_field(file_lst1["in"], file_lst1["ff"])
    
    • By default, the values 'file_lst1["ff"]' do not have a path which means that 'file_lst1["ff"]' files will be created on the current directory. If you want to specify any directory to put intermediate files, edit and add your path in 'file_lst1'.

Refer to 'swsred/reduce_all.py' for all the procedures.

Questions & Answers

Known bugs

Changes

Version 2021.01.31

Contact

Please send your bug reports or questions to konishi__at__ioa.s.u-tokyo.ac.jp.


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS