Common utility tools for the Subaru Prime Focus Spectrograph (PFS) Data Reduction Pipeline.
The pfs_utils
package provides a collection of utilities for working with data from the Prime Focus Spectrograph (PFS) instrument at the Subaru Telescope. These utilities support various aspects of the PFS Data Reduction Pipeline (DRP) and instrument operation.
PFS is a wide-field, multi-object spectrograph capable of simultaneously obtaining spectra for up to 2,400 astronomical targets. This package contains tools essential for processing PFS data and managing the instrument's components.
Important: pfs_utils
(and its dependency on pfs_datamodel
) is the only repository that is used in both the data reduction pipeline (DRP) code that exists in the pfs
namespace as well as the instrument control software (ICS) code that is used by various actors. Because of this dual usage, further pfs
dependencies should not be added to this module.
-
Coordinate Transformations: Tools for transforming between different coordinate systems used by the PFS instrument, including:
- Metrology Camera System (MCS) coordinates
- Prime Focus Instrument (PFI) coordinates
- Sky coordinates
- Distortion correction and measurement
-
Fiber Management: Utilities for working with the fiber system, including:
- Fiber ID calculation and conversion
- Fiber positioning and configuration
- Cobra positioner management
-
Data Model Integration: Tools for working with the PFS data model and Butler data management system
-
Instrument Configuration: Constants and parameters for the PFS instrument configuration
- Python 3.12 or later
- Dependencies listed in
pyproject.toml
This package uses the Extended Unix Product System (EUPS) for dependency management and environment setup, which is part of the LSST Science Pipelines software stack. The LSST stack is a comprehensive framework for astronomical data processing that provides powerful tools for image processing, astrometry, and data management.
-
Ensure you have the LSST stack installed on your system. If not, follow the installation instructions at the LSST Science Pipelines documentation.
-
Once the LSST stack is set up, declare and setup this package using EUPS:
eups declare -r /path/to/pfs_utils pfs_utils git setup -r /path/to/pfs_utils
-
The package's EUPS table file (
ups/pfs_utils.table
) will automatically set up the required dependencies within the LSST stack environment:- pfs_instdata
- pfs_datamodel
Alternatively, you can install the package using pip:
pip install git+https://github.com/Subaru-PFS/pfs_utils.git
git clone https://github.com/Subaru-PFS/pfs_utils.git
cd pfs_utils
pip install -e .
python/pfs/utils/coordinates/
: Coordinate transformation utilitiespython/pfs/utils/datamodel/
: Data model integrationpython/pfs/utils/
: General utilities for fiber management, configuration, etc.data/
: Data files used by the utilitiestests/
: Unit testsdocs/
: Documentationnotebooks/
: Jupyter notebooks with examples
pfs-datamodel
: PFS data model packagenumpy
(>= 2.0): Numerical computingastropy
: Astronomical calculationsmatplotlib
: Plotting and visualizationpandas
: Data manipulationscipy
: Scientific computingastroplan
: Observation planningpytz
: Timezone handling
Contributions to pfs_utils
are welcome. Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Run the tests to ensure they pass
- Submit a pull request
This project is part of the Subaru Prime Focus Spectrograph (PFS) project and is subject to the licensing terms of the PFS collaboration.
For questions or issues related to this software, please contact the PFS software team or create an issue in the repository.