modified by jhwshin
Python Packages and PATHS are contained within the python virtual environment pipeline for modularity.
python3pip
- Create a python virtual environment:
$ python -m venv venv- Patch
activateto addpipeline/{src,reduction_scripts}toPYTHONPATHSin venv:
$ patch -u venv/bin/activate -i pypaths.patch- Create shortcut to
activatevenv:
$ ln -sv venv/bin/activate .- Activate to start the python venv:
$ source activate- Upgrade
pipto latest version:
$ pip install --upgrade pip- Install required packages with
pip:
$ pip install -r requirements.txtTo EXIT the venv simply type:
$ deactivateTo START the environment again type:
$ source activate- All files are contained within
templatefolder, copy it and rename to any workspace name:
$ cp template <NAME>
$ cp <PATH_TO_FITS>/*.fits <NAME>/raw_data- Generate metadata from raw
fitsfiles:
$ python2 generate_metadata_script.py raw_data- raw_data dir containing
*.fitsfiles
Outputs:
save_{blue,red}_metadata.pyfiles
- Create pickle files:
$ python2 save_{red,blue}_metadata.pyOutputs:
wifes{B,R}_.*_metadata.pklfiles
- Run
reduce_{blue,red}
$ python2 reduce_{blue,red} wifes{B,R}_.*_metadata.pkl- Or run this command for sanitised output with log file:
$ python2 -u -W ignore reduce_{blue,red} wifes{B,R}_.*_metadata.pkl 2>&1 | tee log.txt
# USEFUL COMMANDS:
# -u unbuffered prints immediately (otherwise will print sporadically with tee)
# -W ignore ignore Warnings
# 2>&1 prints stderr to stdout (used for tee)- new
reference_datafrom latest originPyWiFeSingithub - rename all
reference_datafiles to.tabas well asstdstar_lookup_tablefor consistency - fixed some bugs in
src/wifi_calib.pywhen searching for starref_names - renamed
templatefolder and added defaultreduc_{b,r}folder
- now running pipeline in
pyvenvfor better abstraction with contained packages and pythonpaths - added
sort.pyas a manual inspection tool - added this
README