modified by jhwshin
Python Packages and PATHS are contained within the python virtual environment pipeline for modularity.
python3
pip
- Create a python virtual environment:
$ python -m venv venv
- Patch
activate
to addpipeline/{src,reduction_scripts}
toPYTHONPATHS
in venv:
$ patch -u venv/bin/activate -i pypaths.patch
- Create shortcut to
activate
venv:
$ ln -sv venv/bin/activate .
- Activate to start the python venv:
$ source activate
- Upgrade
pip
to latest version:
$ pip install --upgrade pip
- Install required packages with
pip
:
$ pip install -r requirements.txt
To EXIT the venv simply type:
$ deactivate
To START the environment again type:
$ source activate
- All files are contained within
template
folder, copy it and rename to any workspace name:
$ cp template <NAME>
$ cp <PATH_TO_FITS>/*.fits <NAME>/raw_data
- Generate metadata from raw
fits
files:
$ python2 generate_metadata_script.py raw_data
- raw_data dir containing
*.fits
files
Outputs:
save_{blue,red}_metadata.py
files
- Create pickle files:
$ python2 save_{red,blue}_metadata.py
Outputs:
wifes{B,R}_.*_metadata.pkl
files
- 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_data
from latest originPyWiFeS
ingithub
- rename all
reference_data
files to.tab
as well asstdstar_lookup_table
for consistency - fixed some bugs in
src/wifi_calib.py
when searching for starref_names
- renamed
template
folder and added defaultreduc_{b,r}
folder
- now running pipeline in
pyvenv
for better abstraction with contained packages and pythonpaths - added
sort.py
as a manual inspection tool - added this
README