Skip to main content

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.

Metadata

Release files for rascal 0.3.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rascal 0.3.10
File Size Uploaded
rascal-0.3.10.tar.gz 301.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rascal 0.3.10
File Interpreter ABI Platform
rascal-0.3.10-py3-none-any.whl Python 3 none any Details

Total release size: 602.3 kB

Release files / rascal-0.3.10.tar.gz

Download URL rascal-0.3.10.tar.gz
Size 301.0 kB
Tags Source
SHA-256 checksum
How to use checksums
035b41c3062dfc2ffa29a4ce9a835586bc32cbe4c6e0ac6ce62918b1ca140519
BLAKE2b-256 checksum
How to use checksums
1ad2b655542ef15a595e6dec346f652cd472a139b9572ba7e56d6f1dcaee4b7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / rascal-0.3.10-py3-none-any.whl

Download URL rascal-0.3.10-py3-none-any.whl
Size 301.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7b93fd2defc65edf84017fb68b3af6123a22b04043dccaf7ccad65034ebed2b
BLAKE2b-256 checksum
How to use checksums
2c0f3df9fb984688ea0bbf6f4549493f6a4225cde125c778dcaab38f7571c5b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.3.10 This release

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page