Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPS-atlas #9

Open
prajwal309 opened this issue Oct 28, 2024 · 0 comments
Open

MPS-atlas #9

prajwal309 opened this issue Oct 28, 2024 · 0 comments

Comments

@prajwal309
Copy link

prajwal309 commented Oct 28, 2024

I was having some trouble with loading mps-atlas using the new version of specutils (v.1.16.0). I had to modify the main.py in the following way to get it working:

        # Load `~speclib.Spectrum` object
        spec = Spectrum(
            spectral_axis=wave_lib * lib_wave_unit,
            flux=flux * lib_flux_unit,
        )
        # Ensure spectra are ordered correctly (problem for mps-atlas grid)
        idx_order = np.argsort(spec.wavelength)
        spec = Spectrum(
            spectral_axis=spec.wavelength[idx_order], flux=spec.flux[idx_order]
        )

Had to change it to:

    idx_order = np.argsort(wave_lib)
    # Load ~speclib.Spectrum` object
    spec = Spectrum(
            spectral_axis=wave_lib[idx_order]*lib_wave_unit,
            flux=flux[idx_order]*lib_flux_unit,
            )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant