<commit_before>from read_spec import *
#from read_spec import Inst
# Instrument parameters
from astropy.time import Time

name = 'STELLA'
obsname = 'teide'
obsloc = dict(lat=28.3, lon= -16.5097, elevation=2390.)

# slicer = 'all'
# slicer = 'odd'
slicer = 'even'

if slicer == 'all':
    iomax = 164 # NAXIS2
else:
    iomax = 82 # NAXIS2
snmax = 500
oset = ':'

# maskfile = 'telluric_mask_carm_short.dat'

pat = '*_botzfxsEcd.fits'


def scan(self, s, pfits=True):
    """
    Returns
    -------
    namedtuple('spectrum', 'w f berv bjd blaze drift timeid sn55 ')
           w    - wavelength
           f    - flux
           berv - Barycentric Earth Radial Velocity
           bjd  - Barycentric Julian Day
           blaze - Blaze filename
           drift - Used RV Drift
           sn55  - S_N order center55
    Example
    -------
    >>> read_carm_vis(filename)
<commit_msg>fix: [STELLA] IndexError: index 2167 is out of bounds for axis 1 with size 2167.<commit_after>from read_spec import *
#from read_spec import Inst
# Instrument parameters
from astropy.time import Time

name = 'STELLA'
obsname = 'teide'
obsloc = dict(lat=28.3, lon= -16.5097, elevation=2390.)

# slicer = 'all'
# slicer = 'odd'
slicer = 'even'

if slicer == 'all':
    iomax = 164 # NAXIS2
else:
    iomax = 82 # NAXIS2
pmax =  2167 - 300

snmax = 500
oset = ':'

# maskfile = 'telluric_mask_carm_short.dat'

pat = '*_botzfxsEcd.fits'


def scan(self, s, pfits=True):
    """
    Returns
    -------
    namedtuple('spectrum', 'w f berv bjd blaze drift timeid sn55 ')
           w    - wavelength
           f    - flux
           berv - Barycentric Earth Radial Velocity
           bjd  - Barycentric Julian Day
           blaze - Blaze filename
           drift - Used RV Drift
           sn55  - S_N order center55
    Example
    -------
    >>> read_carm_vis(filename)

{'fraction_non_alphanumeric': 0.1147011308562197, 'fraction_numerical': 0.03984921917070544, 'mean_word_length': 2.2482517482517483, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7514009', 'n_tokens_mistral': 726, 'n_tokens_neox': 653, 'n_words': 187}