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

Update documentation to be accurate and address TODOs #93

Open
hematthi opened this issue Jun 21, 2022 · 1 comment
Open

Update documentation to be accurate and address TODOs #93

hematthi opened this issue Jun 21, 2022 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@hematthi
Copy link
Collaborator

""" Read line list in VALD csv format.
VALD format: lambda_lo, lambdaa_hi and depth.
convert_air_to_vacuum determines whether to convert to vacuum wavelengths.
"""
function read_linelist_vald(fn::String; convert_air_to_vacuum::Bool = true)
local df = CSV.read(fn,DataFrame,threaded=false,header=["lambda","depth"])
@assert hasproperty(df, :lambda)
@assert hasproperty(df, :depth)
if convert_air_to_vacuum
df[!,:lambda] .= λ_air_to_vac.(df[!,:lambda])
end
df[!,:weight] = df[!,:depth] # TODO: Decide out what we want to do about tracking depths and weights sepoarately
return df
end
""" Read line list in csv format.
format: lambda, weight, lambda_lo, lambdaa_hi.
Assumes air to vacuumb wavelength conversion has already been applied.
"""
function read_linelist_rvspectml(fn::String)
local df = CSV.read(fn,DataFrame,threaded=false)
@assert hasproperty(df, :lambda)
@assert hasproperty(df, :weight) || hasproperty(df, :depth)
if hasproperty(df, :depth) && !hasproperty(df, :weight)
df[!,:weight] = df[!,:depth] # TODO: Decide out what we want to do about tracking depths and weights sepoarately
end
return df
end

Docstring says there are lambda_lo and lambda_hi but the functions only use lambda

@hematthi hematthi added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 21, 2022
@hematthi
Copy link
Collaborator Author

Also here:

df[!,:depth] = df[!,:weight] # TODO: Decide out what we want to do about tracking depths and weights sepoarately

df[!,:weight] = df[!,:depth] # TODO: Decide out what we want to do about tracking depths and weights sepoarately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant