Skip to content

Commit cf5b91d

Browse files
committed
SPARC Rodrigues2018 a0 data, release 0.1.5
1 parent ae48898 commit cf5b91d

6 files changed

Lines changed: 23 additions & 2 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "AstroIC"
22
uuid = "5b3ca070-48c3-41ea-b469-89825dd01fde"
3-
version = "0.1.4"
3+
version = "0.1.5"
44
authors = ["islent <[email protected]>"]
55

66
[deps]

src/AstroIC.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ using Dierckx
1616
using QuadGK
1717
using Optim
1818
using CSV
19+
using XLSX
1920
using UnitfulAngles
2021
using Measurements
2122

14.6 KB
Binary file not shown.
16.7 KB
Binary file not shown.

src/data/SPARC.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,24 @@ function load_SPARC_LTGs_data(;
9797
df[!, :M_h] = zeros(size(df,1))
9898
df[!, :chi2RC] = zeros(size(df,1))
9999
df[!, :chi2RAR] = zeros(size(df,1))
100+
101+
# Load Rodrigues2018 data if file exists
102+
rodrigues_file = joinpath(@__DIR__, "Rodrigues2018a0/41550_2018_498_MOESM3_ESM.xlsx")
103+
T = XLSX.readdata(rodrigues_file, "Sheet 1 - Table S3", "A2:L177")
104+
df_rodrigues2018 = DataFrame(T[2:end, :], :auto)
105+
rename!(df_rodrigues2018, string.(T[1, :]))
106+
107+
df[!, "a0_rodrigues2018"] = zeros(length(df.Galaxy))
108+
df[!, :a0_rodrigues2018_std_lower] = zeros(length(df.Galaxy))
109+
df[!, :a0_rodrigues2018_std_upper] = zeros(length(df.Galaxy))
110+
111+
for Galaxy_id in 1:length(df.Galaxy)
112+
id = findfirst(x->x==df.Galaxy[Galaxy_id], df_rodrigues2018.Galaxy)
113+
if !isnothing(id)
114+
df.a0_rodrigues2018[Galaxy_id] = 10^(df_rodrigues2018.var"Log_10 a0"[id]) * 1000
115+
end
116+
end
117+
100118
return df
101119
end
102120

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ include("solarsystem.jl")
2424
@test length(df.Galaxy) == 27
2525

2626
@test !isnothing(load_SPARC_LTGs_RC())
27-
@test !isnothing(load_SPARC_LTGs_data())
27+
dfSPARC = load_SPARC_LTGs_data()
28+
@test !isnothing(dfSPARC)
29+
@test !isempty(dfSPARC.a0_rodrigues2018)
2830
@test !isnothing(load_li2018_SPARC())
2931

3032
@test !isnothing(load_SPARC_Xray_ETGs_data())

0 commit comments

Comments
 (0)