Tools for dealing with SDSS-V plate files and plate runs.
Installation :PROPERTIES: :header-args: :results silent :END:
Setup environment (optional, but recommended) \
If fulfilling the [[require][Requirements]] seems daunting and you run the conda package manager, you can set up a python environment that will happily install ppv
with
conda env create -f ppv_sdss_min.yml # creates conda environment conda activate ppv # activates conda environment
Once you have activated your environment, proceed to clone and install!
Clone this repository and install
git clone https://github.com/jcbird/ppv.git # clone repository cd ppv
Install with ~pip~. Note the =-e= option. With this option, pip
will automatically reinstall ~ppv~ when you pull the latest commit. Very handy!
pip install -e . # installs ppv package
Requirements <
Configuration and Data Files ~ppv~ interacts with a number of data files and needs to know their location on disk. This is accomplished through the configuration file [[file:ppv_setup.ini][=ppv_setup.ini=]]. This setup file is short, but will grow in future releases.
The contents of ~ppv_setup.ini~ | parameter | default value | description | |------------------+--------------------------------------------+----------------------------------------------------------------| | =plate_dir= | =/home/user/path/to/platedir= | absolute path to directory to store plate files | | =fiveplates_dir= | =/home/user/path/to/five_plates/plateruns= | absolute path to plateruns directory inside =five_plates= repo | | =sdss_org= | =username_at_utah= | username for sdss.org server at Utah |
Notes:
** Copy ~ppv_setup.ini~ to ~/.config and edit You MUST edit the ~ppv_setup.ini~ and copy it to the ~.config~ directory in your home directory. Make this directory if necessary. Using a posix shell,
mkdir ~/.config cd ppv cp ppv_setup.ini ~/.config
and edit accordingly.
** =five_plates= functionality [[~five_plates~][=https://github.com/sdss/five_plates/tree/master/python=]] produces the input files for the plate design code. ~ppv~ can interact with these "field files" as well.
** Plate directory and PlugHoles files If you have an account at Utah and put the ~ppv_setup.ini~ file in your =$HOME/.config= directory, you are good to go! ~ppv~ will take of everything! *** run =ppv.ppv.update_platefiles()= to ensure the latest versions of all plate files. See the [[file:docs/PPV_tutorial.ipynb][tutorial notebook]] in the =docs= directory for an example of this.
| Since version or commit | Change | | =v0.3= | list of available plateruns are now accessible via =ppv.ppv.available_plateruns()= | | =v0.3= | summary table of all plates now accessible via =ppv.ppv.allplate_summary= | | =v0.35= | =ppv.targets.Targets= constructor now just takes table and, optionally, column names |
Plate Summary Table accessible via ~ppv.ppv.allplate_summary~. Each row corresponds to a single plate and contains, amongst other columns, the plate id, position of the plate center, the program name driving plate design, the corresponding field (name), and the platerun. Plate One to one correspondence with a plate. A =Plate= is identified by its unique plate id (an integer; e.g., 15004). Field A field is defined by a field name (a string; e.g., =AQM_001.85+26.44=) and represents one field of view on the sky. All plates belong to one field. All fields contain one or more plates. Platerun A platerun is defined by its name (a string; e.g., 2020.08.c.bhm-mwm). A platerun is a collection of fields (and thus plates) to be a drilled for a given observing run. ** Targets The Targets class is a container for your targets of interest and interfaces with the Plate, Field, and Platerun objects.
Basic Usage See the [[file:docs/PPV_tutorial.ipynb][tutorial notebook]] in the =docs= directory. Specific example [[file:docs/platerun_2020_10_a_mwm_bhm_example.ipynb][notebook with 2020.10.a.mwm-bhm plate run]]
FAQs I don't have an account at Utah and/or I can't get the plugHoles files. If you plan on checking SDSS-V targeting, please sign up for a Utah account at https://wiki.sdss.org/display/DATA/Utah+Accounts.\ PLEASE DO THIS! \ If there is a delay in getting an account for any reason, submit an issue with "No Utah account" as the title. I will send you a tarball with the correct files and directory structure. I don't know the catalogIDs of the targets I want to check. Look at the tutorial notebook (under Targets) to see if downloading one of the carton targetDB files is helpful. If not, create an issue and I will help asap! *** Something doesn't work, I wish ~ppv~ did THIS, why does ~ppv~ do THIS, I want to do X with ~ppv~, or I wish something in ~ppv~ had a different name. Awesome, let's make it work. Submit an issue!
TODOs 1) Sort targets and plugHoles tables by catalogID (after making sure that no info is lost in plugHoles files) 2) Make it easy to get Gaia source IDs for all targets. 3) Get documentation into ReadtheDocs format. 4) Better Targets constructor. ** DONE 1) Make functions to update platePlans summary. 2) Interface with five_plates field files.