Tools for dealing with SDSS-V plate files and plate runs.
- Setup environment (optional, but recommended)
If fulfilling the Requirements seems daunting and you run the conda package manager, you can set up a python environment that will happily install `ppv` withconda 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 reinstallppv
when you pull the latest commit. Very handy!pip install -e . # installs ppv package
- Requirements <<require>>
- python (>3.5, 3.8 preferred) [if this frightens you, read on]
- astropy
- pexpect (this is a dependency of ipython)
- pydl (development version) Package from Benjamin Weaver for dealing with yanny files.
ppv
interacts with a number of data files and needs to know their location on disk. This is accomplished through the configuration file =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:
- file is ONLY read locally.
plate_dir
does not need to exist.ppv
will automatically create this directory if needed.
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.
=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.
- You MUST clone the
five_plates
to the local machine runningppv
AND edit yourppv_setup.ini
file to point to theplateruns
directory inside the repository. Be sure to perform agit pull
when necessary to get the latest plateruns files. - See the =five_plates= tutorial notebook in the
docs
directory for an example of this.
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!
See the tutorial notebook in the docs
directory for an example of this.
In the interest of speed, ppv
is following the, “break early and often” maxim. Inevitably, some changes will need to occur that are not backward-compatible. Apologies for the lack of a deprecation warning! Note that the tutorial notebooks in the docs
folder are always updated to the latest syntax. With the hope that this section stays very short, the following breaking changes need to be accounted for:
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 |
There are four basic objects in the ppv
package: Plate
, Field
, Platerun
, and Targets
. There is also a convenient plate summary table.
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.
One to one correspondence with a plate. A Plate
is identified by its unique plate id (an integer; e.g., 15004).
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.
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.
The Targets class is a container for your targets of interest and interfaces with the Plate, Field, and Platerun objects.
See the tutorial notebook in the docs
directory.
Specific example notebook with 2020.10.a.mwm-bhm plate run
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.
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!
- Sort targets and plugHoles tables by catalogID (after making sure that no info is lost in plugHoles files)
- Make it easy to get Gaia source IDs for all targets.
- Get documentation into ReadtheDocs format.
- Better Targets constructor.
- Make functions to update platePlans summary.
- Interface with five_plates field files.