-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmake_small_osds.jl
More file actions
24 lines (15 loc) · 876 Bytes
/
make_small_osds.jl
File metadata and controls
24 lines (15 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
@warn "This script was last used prior to Julia v1.0 and will likely need updating."
@warn "This script has not been updated to account for SysSim's new directory structure."
using JLD
using DataFrames
OSD_file = load(joinpath(Pkg.dir(), "ExoplanetsSysSim", "data", "allosds.jld"))
allosds = OSD_file["allosds"]
periods = OSD_file["periods"]
kepids = OSD_file["kepids"]
OSD_file = 0
cat_ids = load(joinpath(Pkg.dir(), "ExoplanetsSysSim", "data", "q1q17_dr25_gaia_fgk_relaxcut.jld"), "stellar_catalog")[:kepid]
tmp_ind = sort([findfirst(x -> x == y, kepids) for y in cat_ids])
kepids = convert(Array{Int64,1}, kepids[tmp_ind])
allosds = allosds[tmp_ind,:,:]
allosds = convert(Array{Float32,3}, allosds)
save(joinpath(Pkg.dir(), "ExoplanetsSysSim", "data", "dr25fgk_relaxcut_osds.jld"), "allosds", allosds, "periods", periods, "kepids", kepids)