Redrock redshift fitter
Project description
Introduction
Redshift fitting for spectroperfectionism.
Installation
To install:
git clone https://github.com/desihub/redrock cd redrock git clone https://github.com/desihub/redrock-templates py/redrock/templates python setup.py install
That will install the templates with the code. Alternatively, the templates can be put elsewhere and set $RR_TEMPLATE_DIR to that location.
We recommend users see details of rrdesi before running redrock to understand the arguments in more detail.
Run:
rrdesi --help
Running Redrock on desi spectra
1) Without Archetypes:
rrdesi -i <spectra_file> -o <output_file> -d <details_file.h5>
2) With Archetypes
In archetype mode, redrock can be run either with one particular archetype file (e.g., GALAXY, QSO or STAR), or you can also provide the directory that contains archetypes for different spectral classes.
You can also define your own set of archetypes. However, users must follow the file structure of redrock archetypes. To start with, the user should clone the following repository to run redrock in Archetype mode.:
git clone https://github.com/abhi0395/new-archetypes.git
Or:
git clone https://github.com/desihub/redrock-archetypes.git
In summary, the archetypes method uses a combination of physical galaxy spectra and Legendre polynomials to construct a new set of templates and then solve for the coefficients using the bounded value least square method for a few redshifts defined by --nminima.
The method solves for the coefficients of the Legendre polynomials in each camera (b, r, z cameras of desi, --archetype-legendre-percamera keyword is introduced for that). Another argument is --archetype-legendre-prior, which can be prescribed to add a prior while solving for the coefficients (e.g. --archetype-legendre-prior 0.1). If --archetype-legendre-degree 0 is provided, the method will only use archetypes to fit the spectra; no Legendre polynomials will be used. Note that a single --archetypes-no-legendre flag will deactivate all other archetype and legendre-related flags.
If you do not want to use default values, you should separately provide those arguments without the --archetypes-no-legendre flag.
Example run (with all the default values, including per camera mode):
rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d <details_file.h5>
Example run (with all the default values but without per camera mode):
rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d <details_file.h5> --archetype-per-camera False
Example run (with no archetype related default values):
rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d <details_file.h5> --archetypes-no-legendre
3) Archetypes + Nearest neighbours (in chi2 space) approach
Similar to archetypes (method - 2), it also looks for the nearest neighbours of the best archetypes in chi2 space, selects a few nearest neighbours (input provided by the user, --archetype-nnearest) and then constructs a new set of templates combining these archetypes and Legendre polynomials to fit the galaxy spectra as described above.
Example run:
rrdesi -i <spectra_file> --archetypes <archetype_dir or archetype_file> -o <output_file> -d <details_file.h5> --archetype-nnearest 2
For comment or help regarding archetypes, please contact abhijeetanand2011_at_gmail_dot_com.
License
redrock is free software licensed under a 3-clause BSD-style license. For details see the LICENSE.rst file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redrock-0.21.0.tar.gz.
File metadata
- Download URL: redrock-0.21.0.tar.gz
- Upload date:
- Size: 955.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d796ff2e9a98466ad60370571c16ab3a8b54cd84720d73e18c0a1723497a12fc
|
|
| MD5 |
a3d0da3a7e0aaf28b63c8bc8b111c968
|
|
| BLAKE2b-256 |
299e0099fdcf442d1213c3149566924604693e32f77a8b53aaddbb9aee1fc683
|
File details
Details for the file redrock-0.21.0-py3-none-any.whl.
File metadata
- Download URL: redrock-0.21.0-py3-none-any.whl
- Upload date:
- Size: 969.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7e2f3b7adcf436e1d2ec8b2d5fe21a3037418d4700974e9c8f6adc0e7c52cdf
|
|
| MD5 |
869a16e3dbd7582a4063fe80ac9ef35a
|
|
| BLAKE2b-256 |
4d29119447765001de23f65eb9072bd16ac6588f38369b88aa15eed1e58cc915
|