Search arXiv⌕ Search

arXiv · 2507.13443

easyspec: An open-source Python package for long-slit spectroscopy

Abstract

In modern-day astronomy, near-infrared, optical, and ultraviolet spectroscopy are indispensable for studying a wide range of phenomena, from measuring black hole masses to analyzing chemical abundances in stellar atmospheres. However, spectroscopic data reduction is often performed using instrument-specific pipelines or legacy software well-established and robust within the community that are often challenging to implement and script in modern astrophysical workflows. In this work, we introduce easyspec, a new Python package designed for long-slit spectroscopy, capable of reducing, extracting, and analyzing spectra from a wide range of instruments--provided they deliver raw FITS files, the standard format for most optical telescopes worldwide. This package is built upon the well-established long-slit spectroscopy routines of the Image Reduction and Analysis Facility (IRAF), integrating modern coding techniques and advanced fitting algorithms based on Markov Chain Monte Carlo (MCMC) simulations. We present a user-friendly open-source Python package that can be easily incorporated into customized pipelines for more complex analyses. To validate its capabilities, we apply easyspec to the active galactic nucleus G4Jy 1709, observed with the DOLORES spectrograph at the Telescopio Nazionale Galileo, measuring its redshift and estimating its supermassive black hole mass. Finally, we compare our results with a previous IRAF-based study.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Raniere de Menezes, Francesco Massaro, Michela Negro, Claudia M. Raiteri, Harold Peña-Herazo, Jose A. Acosta-Pulido. 2025-07-17. easyspec: An open-source Python package for long-slit spectroscopy. https://arxiv.org/abs/2507.13443

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Radial Pulsations in Polaris: A Secondary Science Application of Cherenkov Telescopes via Intensity Interferometry

Ground-based Cherenkov telescopes, which are typically inoperative during moonlit nights for gamma-ray observations, offer a valuable opportunity during this time for secondary scientific applications through Intensity Interferometry (II). Recent developments and observations suggest that implementing II instrumentation on existing and planned Imaging Atmospheric Cherenkov Telescopes (IACTs) can significantly advance optical stellar measurements. Motivated by the resurgence of II efforts over the past two decades, this work presents simulations demonstrating the estimation of stellar parameters for a radially pulsating star, such as Polaris, using either a single telescope or multiple telescopes. For single-telescope simulations, we assume that the photon pixels in the camera are mapped onto four distinct regions of the aperture, generating multiple baselines and enabling enhanced observational plane coverage. These results highlight the potential of Cherenkov telescopes in India for high-resolution optical astronomy during otherwise inoperative periods and offer promising insights into the characterization of bright stellar objects with unprecedented precision.

astro-ph.IM↗

Parallel adaptive reweighting importance sampling for Bayesian astrophysics

Efficient sampling from high-dimensional, multi-modal posteriors is a central challenge in Bayesian inference across the physical sciences. Gravitational-wave (GW) astronomy, where likelihood evaluations are computationally expensive and posteriors are complex, is one application motivating this work. Popular families of methods like Markov-chain Monte Carlo, nested sampling, and importance sampling all rely on proposal distributions to guide exploration. Because prior knowledge of the target is often limited, practitioners can adopt adaptive proposals that iteratively refine themselves using information gained from previously drawn samples. Traditional adaptive strategies, however, struggle in high-dimensional multi-modal settings: complex, non-linear correlations are hard to capture, and hyperparameters typically require tedious, problem-specific tuning. To address these issues, we introduce Parallel Adaptive Reweighting Importance Sampling (PARIS; descriptively, ``seed sampling''). PARIS models its proposal as a Gaussian mixture whose component centers are the existing samples and whose component weights match the current importance weights. New draws from the proposal therefore concentrate around high-weight regions, while candidate points in unexplored areas receive intentionally inflated weights. As the algorithm continuously reweights all samples up to the latest proposal, any initial over-weighting self-corrects once additional neighbor samples are collected. To enable rapid reweighting, we present an efficient update scheme and evaluate PARIS on illustrative toy problems and more realistic gravitational-wave parameter estimation tasks. PARIS achieves accurate posterior reconstruction and evidence estimation with substantially fewer function evaluations than competing approaches, highlighting its promise for widespread use in astrophysical data analysis.

astro-ph.IM↗

Ising noise filter: physics-informed filtering for particle detectors

We present the Ising noise filter, a highly portable, graph-based pre-filtering algorithm for early-stage background suppression in particle accelerators and astrophysical detectors. Standard noise rejection methods relying on track fitting suffer from severe combinatorial explosion. Our method bypasses this by mapping individual detector hits to a network of binary spins and minimizing an energy functional. The interaction kernels are physics-informed, tailored to the underlying physics and geometry of the experiment. We demonstrate the efficacy of this approach in two distinct experimental regimes. Applied to the Baikal-GVD neutrino telescope the filter yields fast, standard-quality noise rejection with 96.8% recall for astrophysical neutrinos. For the SPD detector at the NICA collider the filter attains recall of 97% on a toy Monte Carlo sample. Furthermore, when combined with a Peterson--Hopfield network for track finding, our physics-informed coupling improves the TrackML score from 0.5 to 0.95.

astro-ph.IM↗