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

function has unused argument orders_to_read and does the exact same thing as the previous function #40

Open
hematthi opened this issue May 20, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@hematthi
Copy link
Collaborator

function read_data(f::FITS, metadata::Dict{Symbol,Any}, orders_to_read::AR ) where { AR<:AbstractRange }
@assert length(f) >= 2
@assert all(map(i->typeof(f[i]) <: FITSIO.ImageHDU,2:length(f)))
img_idx = Dict(map(i->first(read_key(f[i],"EXTNAME"))=>i,2:length(f)))
λ, flux, var = FITSIO.read(f[img_idx["WAVEDATA_AIR_BARY"]]), FITSIO.read(f[img_idx["SCIDATA"]]), FITSIO.read(f[img_idx["ERRDATA"]]).^2
metadata[:normalization] = :raw
spectrum = Spectra2DBasic(λ, flux, var, HARPSN2D(), metadata=metadata)
apply_doppler_boost!(spectrum,metadata)
return spectrum
end

@hematthi hematthi added the help wanted Extra attention is needed label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant