<commit_before>import numpy as np

import scipy.sparse
import scipy.sparse.linalg

import bosslya

class ContinuumFitter():
    def __init__(self, params, obsWaveMin, obsWaveMax,
        restWaveMin, restWaveMax, restNParams, verbose=False):
        self.verbose = verbose

        # initialize binning arrays
        assert obsWaveMax > obsWaveMin, ('obsWaveMax must be greater than obsWaveMin')
        self.obsWaveMin = obsWaveMin
        self.obsWaveMax = obsWaveMax

        self.obsWaveMinIndex = bosslya.getFiducialPixelIndexOffset(np.log10(obsWaveMin))
        self.obsWaveMaxIndex = bosslya.getFiducialPixelIndexOffset(np.log10(obsWaveMax))

        self.obsWaveCenters = bosslya.getFiducialWavelength(np.arange(self.obsWaveMinIndex,self.obsWaveMaxIndex+1))<commit_msg>clean up obs wave grid calculation<commit_after>import numpy as np

import scipy.sparse
import scipy.sparse.linalg

import bosslya

class ContinuumFitter():
    def __init__(self, params, obsWaveMin, obsWaveMax,
        restWaveMin, restWaveMax, restNParams, verbose=False):
        self.verbose = verbose

        # initialize binning arrays
        assert obsWaveMax > obsWaveMin, ('obsWaveMax must be greater than obsWaveMin')
        self.obsWaveMin = obsWaveMin
        self.obsWaveMax = obsWaveMax

        obsFiducialWave = bosslya.getFiducialWavelength(np.arange(4800))
        self.obsWaveMinIndex = np.argmax(obsFiducialWave > obsWaveMin)
        self.obsWaveMaxIndex = np.argmax(obsFiducialWave > obsWaveMax)+1

        self.obsWaveCenters = bosslya.getFiducialWavelength(np.arange(self.obsWaveMinIndex,self.obsWaveMaxIndex))
{'fraction_non_alphanumeric': 0.07744733581164807, 'fraction_numerical': 0.006195786864931847, 'mean_word_length': 4.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '2923310', 'n_tokens_mistral': 569, 'n_tokens_neox': 505, 'n_words': 98}