-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reset pha/ and scripts/ to origin/main
- Loading branch information
Showing
7 changed files
with
115 additions
and
115 deletions.
There are no files selected for viewing
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
###julia --machine-file <host-file> distributed.jl | ||
###julia -p <number-of-processors> distributed.jl | ||
|
||
# using Distributed # not necessary when doing `julia -p ...` or `julia --machine-file...` | ||
@everywhere begin | ||
import Pkg | ||
Pkg.activate("../") | ||
# Pkg.instantiate() | ||
end | ||
@everywhere begin | ||
using Apophis | ||
using Dates | ||
using TaylorSeries | ||
|
||
#script parameters (TODO: use ArgParse.jl instead) | ||
const objname = "Apophis" | ||
const maxsteps = 10000 | ||
const nyears = 5.0 | ||
const dense = true#false | ||
const apophisjlpath = pkgdir(Apophis) | ||
const radarobsfile = joinpath(apophisjlpath, "Apophis_JPL_data_2012_2013.dat") | ||
const dynamics = RNp1BP_pN_A_J23E_J2S_ng_eph_threads! | ||
const t0 = datetime2julian(DateTime(2008,9,24,0,0,0)) #starting time of integration | ||
const tmax = t0+365.25nyears #final time of integration | ||
@show t0 == 2454733.5 | ||
@show tmax | ||
|
||
function earth_et(et) | ||
return ss16asteph( Apophis.etsecs2julian(et) )[union(3*4-2:3*4,3*(27+4)-2:3*(27+4))] | ||
end | ||
function sun_et(et) | ||
return ss16asteph( Apophis.etsecs2julian(et) )[union(3*1-2:3*1,3*(27+1)-2:3*(27+1))] | ||
end | ||
end | ||
|
||
# path to local Solar System ephemeris file | ||
# ss_eph_file = joinpath(pkgdir(Apophis), "jldeph", "ss16ast343_eph_24yr_tx.jld") | ||
ss_eph_file = joinpath(pkgdir(Apophis), "jldeph", "ss16ast343_eph_5yr_tx.jld") | ||
|
||
ss16asteph, acc_eph, newtonianNb_Potential = Apophis.loadeph(ss_eph_file) | ||
|
||
aux = (ss16asteph, acc_eph, newtonianNb_Potential, earth_et, sun_et) | ||
for i in 1:nworkers() | ||
@spawnat i+1 aux = (ss16asteph, acc_eph, newtonianNb_Potential, earth_et, sun_et) | ||
end | ||
|
||
#warmup (compilation) short run on all processes | ||
parallel_run(objname, dynamics, 1, t0, tmax, aux, output=false) | ||
println("*** Finished warmup") | ||
|
||
#Full jet transport integration until ~2038: about 8,000 steps | ||
# parallel_run(objname, dynamics, maxsteps, t0, tmax, aux, radarobsfile=radarobsfile) | ||
# println("*** Finished full jet transport integration") | ||
###julia --machine-file <host-file> distributed.jl | ||
###julia -p <number-of-processors> distributed.jl | ||
|
||
# using Distributed # not necessary when doing `julia -p ...` or `julia --machine-file...` | ||
@everywhere begin | ||
import Pkg | ||
Pkg.activate("../") | ||
# Pkg.instantiate() | ||
end | ||
@everywhere begin | ||
using Apophis | ||
using Dates | ||
using TaylorSeries | ||
|
||
#script parameters (TODO: use ArgParse.jl instead) | ||
const objname = "Apophis" | ||
const maxsteps = 10000 | ||
const nyears = 5.0 | ||
const dense = true#false | ||
const apophisjlpath = pkgdir(Apophis) | ||
const radarobsfile = joinpath(apophisjlpath, "Apophis_JPL_data_2012_2013.dat") | ||
const dynamics = RNp1BP_pN_A_J23E_J2S_ng_eph_threads! | ||
const t0 = datetime2julian(DateTime(2008,9,24,0,0,0)) #starting time of integration | ||
const tmax = t0+365.25nyears #final time of integration | ||
@show t0 == 2454733.5 | ||
@show tmax | ||
|
||
function earth_et(et) | ||
return ss16asteph( Apophis.etsecs2julian(et) )[union(3*4-2:3*4,3*(27+4)-2:3*(27+4))] | ||
end | ||
function sun_et(et) | ||
return ss16asteph( Apophis.etsecs2julian(et) )[union(3*1-2:3*1,3*(27+1)-2:3*(27+1))] | ||
end | ||
end | ||
|
||
# path to local Solar System ephemeris file | ||
# ss_eph_file = joinpath(pkgdir(Apophis), "jldeph", "ss16ast343_eph_24yr_tx.jld") | ||
ss_eph_file = joinpath(pkgdir(Apophis), "jldeph", "ss16ast343_eph_5yr_tx.jld") | ||
|
||
ss16asteph, acc_eph, newtonianNb_Potential = Apophis.loadeph(ss_eph_file) | ||
|
||
aux = (ss16asteph, acc_eph, newtonianNb_Potential, earth_et, sun_et) | ||
for i in 1:nworkers() | ||
@spawnat i+1 aux = (ss16asteph, acc_eph, newtonianNb_Potential, earth_et, sun_et) | ||
end | ||
|
||
#warmup (compilation) short run on all processes | ||
parallel_run(objname, dynamics, 1, t0, tmax, aux, output=false) | ||
println("*** Finished warmup") | ||
|
||
#Full jet transport integration until ~2038: about 8,000 steps | ||
# parallel_run(objname, dynamics, maxsteps, t0, tmax, aux, radarobsfile=radarobsfile) | ||
# println("*** Finished full jet transport integration") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
#Multi-threaded: | ||
#julia -t <number-of-threads> --project=@. main.jl | ||
#Single thread: | ||
#julia --project=@. main.jl | ||
using NEOs | ||
using Dates | ||
using TaylorIntegration | ||
using JLD2 | ||
using SPICE: furnsh | ||
@show Threads.nthreads() | ||
|
||
#script parameters (TODO: use ArgParse.jl instead) | ||
const varorder = 5 # 1 # varorder is the order corresponding to the jet transport perturbation | ||
const nv = 7 #number of TaylorN variables | ||
const objname = "Apophis" | ||
const maxsteps = 10000 | ||
const nyears = 6.0 #-5.0 #21.0 | ||
const dense = false #true | ||
const quadmath = false # use quadruple precision | ||
const debias_table = "2018" # "2014", "hires2018" | ||
const apophisjlpath = pkgdir(NEOs) | ||
const dynamics = RNp1BP_pN_A_J23E_J2S_ng_eph_threads! | ||
const jd0 = datetime2julian(DateTime(2008,9,24,0,0,0)) #Julian date of integration initial time | ||
@show jd0 == 2454733.5 | ||
const t0 = 0.0 # integration initial time | ||
|
||
#### observation data files (ra/dec, del/dop) | ||
const opticalobsfile = "" | ||
const radarobsfile = "" | ||
#const opticalobsfile = joinpath(apophisjlpath, "data", "tholen13_mpc_formatted.dat") | ||
#const radarobsfile = joinpath(apophisjlpath, "data", "Apophis_JPL_data_2005_2006.dat") | ||
#const opticalobsfile = joinpath(apophisjlpath, "data", "vokr15_mpc_formatted.dat") | ||
#const radarobsfile = joinpath(apophisjlpath, "data", "Apophis_JPL_data_2012_2013.dat") | ||
|
||
# path to local Solar System ephemeris file | ||
#ss_eph_file = joinpath(apophisjlpath, "jldeph", "ss16ast343_eph_m5y_et.jld") | ||
ss_eph_file = joinpath(apophisjlpath, "jldeph", "ss16ast343_eph_p6y_et.jld") | ||
|
||
#### dq: perturbation to nominal initial condition (Taylor1 jet transport) | ||
#dq = Taylor1.(zeros(7), varorder) | ||
#dq[end][1] = 1e-14 | ||
|
||
#### dq: perturbation to nominal initial condition (TaylorN jet transport) | ||
dq = set_variables("δx", order=varorder, numvars=nv) | ||
for i in 1:6 | ||
dq[i][1][i] = 1e-8 | ||
end | ||
if get_numvars() == 7 | ||
dq[7][1][7] = 1e-14 | ||
end | ||
|
||
####integrator warmup | ||
propagate(objname, dynamics, 1, t0, nyears, ss_eph_file, output=false, dense=dense, dq=dq, quadmath=quadmath) | ||
println("*** Finished warmup") | ||
|
||
#propagate(objname, dynamics, 300 #=5=#, t0, nyears, ss_eph_file, dense=dense, dq=dq, quadmath=quadmath) | ||
#println("*** Finished 5 steps") | ||
|
||
######Full jet transport integration until ~2038: about 8,000 steps | ||
###propagate(objname, dynamics, maxsteps, t0, nyears, ss_eph_file, dense=dense, dq=dq) # no obs ephemeris computation | ||
propagate(objname, dynamics, maxsteps, t0, nyears, ss_eph_file, dense=dense, dq=dq, quadmath=quadmath, radarobsfile=radarobsfile, opticalobsfile=opticalobsfile, debias_table=debias_table) | ||
println("*** Finished full jet transport integration") | ||
#Multi-threaded: | ||
#julia -t <number-of-threads> --project=@. main.jl | ||
#Single thread: | ||
#julia --project=@. main.jl | ||
using NEOs | ||
using Dates | ||
using TaylorIntegration | ||
using JLD2 | ||
using SPICE: furnsh | ||
@show Threads.nthreads() | ||
|
||
#script parameters (TODO: use ArgParse.jl instead) | ||
const varorder = 5 # 1 # varorder is the order corresponding to the jet transport perturbation | ||
const nv = 7 #number of TaylorN variables | ||
const objname = "Apophis" | ||
const maxsteps = 10000 | ||
const nyears = 6.0 #-5.0 #21.0 | ||
const dense = false #true | ||
const quadmath = false # use quadruple precision | ||
const debias_table = "2018" # "2014", "hires2018" | ||
const apophisjlpath = pkgdir(NEOs) | ||
const dynamics = RNp1BP_pN_A_J23E_J2S_ng_eph_threads! | ||
const jd0 = datetime2julian(DateTime(2008,9,24,0,0,0)) #Julian date of integration initial time | ||
@show jd0 == 2454733.5 | ||
const t0 = 0.0 # integration initial time | ||
|
||
#### observation data files (ra/dec, del/dop) | ||
const opticalobsfile = "" | ||
const radarobsfile = "" | ||
#const opticalobsfile = joinpath(apophisjlpath, "data", "tholen13_mpc_formatted.dat") | ||
#const radarobsfile = joinpath(apophisjlpath, "data", "Apophis_JPL_data_2005_2006.dat") | ||
#const opticalobsfile = joinpath(apophisjlpath, "data", "vokr15_mpc_formatted.dat") | ||
#const radarobsfile = joinpath(apophisjlpath, "data", "Apophis_JPL_data_2012_2013.dat") | ||
|
||
# path to local Solar System ephemeris file | ||
#ss_eph_file = joinpath(apophisjlpath, "jldeph", "ss16ast343_eph_m5y_et.jld") | ||
ss_eph_file = joinpath(apophisjlpath, "jldeph", "ss16ast343_eph_p6y_et.jld") | ||
|
||
#### dq: perturbation to nominal initial condition (Taylor1 jet transport) | ||
#dq = Taylor1.(zeros(7), varorder) | ||
#dq[end][1] = 1e-14 | ||
|
||
#### dq: perturbation to nominal initial condition (TaylorN jet transport) | ||
dq = set_variables("δx", order=varorder, numvars=nv) | ||
for i in 1:6 | ||
dq[i][1][i] = 1e-8 | ||
end | ||
if get_numvars() == 7 | ||
dq[7][1][7] = 1e-14 | ||
end | ||
|
||
####integrator warmup | ||
propagate(objname, dynamics, 1, t0, nyears, ss_eph_file, output=false, dense=dense, dq=dq, quadmath=quadmath) | ||
println("*** Finished warmup") | ||
|
||
#propagate(objname, dynamics, 300 #=5=#, t0, nyears, ss_eph_file, dense=dense, dq=dq, quadmath=quadmath) | ||
#println("*** Finished 5 steps") | ||
|
||
######Full jet transport integration until ~2038: about 8,000 steps | ||
###propagate(objname, dynamics, maxsteps, t0, nyears, ss_eph_file, dense=dense, dq=dq) # no obs ephemeris computation | ||
propagate(objname, dynamics, maxsteps, t0, nyears, ss_eph_file, dense=dense, dq=dq, quadmath=quadmath, radarobsfile=radarobsfile, opticalobsfile=opticalobsfile, debias_table=debias_table) | ||
println("*** Finished full jet transport integration") |
Empty file.
Empty file.
Empty file.