Skip to main content

The Pyhton Automated Wavelenmgth Calibrator.

Project description

Rascal: RANSAC Assisted Spectral CALibration

Python package Coverage Status Readthedocs Status PyPI version Downloads DOI Code style: black

Rascal is a library for automated spectrometer wavelength calibration. It has been designed primarily for astrophysics applications, but should be usable with spectra captured from any similar spectrometer.

Given a set of peaks located in your spectrum, Rascal will attempt to determine a model for your spectrometer to convert between pixels and wavelengths.

Unlike other calibration methods, rascal does not require you to manually select lines in your spectrum. Ideally you should know approximate parameters about your system, namely:

  • What arc lamp was used (e.g. Xe, Hg, Ar, CuNeAr)
  • What the dispersion of your spectrometer is (i.e. angstroms/pixel)
  • The spectral range of your system, and the starting wavelength

You don't need to know the dispersion and start wavelength exactly. Often this information is provided by the observatory, but if you don't know it, you can take a rough guess. The closer you are to the actual system settings, the more likely it is that Rascal will be able to solve the calibration. Blind calibration, where no parameters are known, is possible but challenging currently. If you don't know the lamp, you can try iterating over the various combinations of sources. Generally when you do get a correct fit, with most astronomical instruments the errors will be extremely low.

More background information can be referred to this arXiv article.

Dependencies

  • python >= 3.7
  • numpy>=1.16,<1.24
  • scipy>=1.3.3
  • pynverse>=0.1.4
  • matplotlib>=3.0.3
  • tqdm>=4.48.0

Optional Dependencies

Installation

Instructions can be found here.

Reporting issues/feature requests

Please use the issue tracker to report any issues or support questions.

Getting started

The quickstart guide will show you how to reduce the example dataset.

Contributing Code/Documentation

If you are interested in contributing code to the project, thank you! For those unfamiliar with the process of contributing to an open-source project, you may want to read through Github’s own short informational section on how to submit a contribution or send me a message.

Style -- we now use black for formatting, you can easily set this up using a pre-commit hook.

pip install pre-commit
pre-commit install

Disclaimer

We duplicate some of the relevant metadata, but we do not process the raw metadata. Some of the metadata this software creates contain full path to the files in your system, which most likely includes a user name on your machine. Please be advised it is your responsibility to be compliant with the privacy law(s) that you are oblidged to follow, and it is your responsibility to remove any metadata that may reveal personal information and/or provide information that can reveal any computing vulunerability.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rascal-0.3.9.tar.gz (301.1 kB view details)

Uploaded Source

Built Distribution

rascal-0.3.9-py3-none-any.whl (301.3 kB view details)

Uploaded Python 3

File details

Details for the file rascal-0.3.9.tar.gz.

File metadata

  • Download URL: rascal-0.3.9.tar.gz
  • Upload date:
  • Size: 301.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for rascal-0.3.9.tar.gz
Algorithm Hash digest
SHA256 edbb4d624272bf34d3c35bd32a9a4624a2f4cba067e52ff85912053477380acb
MD5 fc2a76a19656bca39a42f086a6e8226e
BLAKE2b-256 6147eae39faa8deec84023f76a78db2cc408d1975010232247bb8b78cf39021c

See more details on using hashes here.

File details

Details for the file rascal-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: rascal-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 301.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for rascal-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ff94ee9e3e8d8ad7ca1110618a16142904ece8933de4a692f990c22214b33074
MD5 ef9b2b1fcef5ed552f09490010669e97
BLAKE2b-256 a4858fcaa36e8e58272bff5352786ef7dd4a4852433b420c1e816a2d7f5b1833

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page