diff --git a/SpiceQL/db/apollo15.json b/SpiceQL/db/apollo15.json index 1e76e74..e6f21d4 100644 --- a/SpiceQL/db/apollo15.json +++ b/SpiceQL/db/apollo15.json @@ -16,13 +16,6 @@ "kernels" : ["AS15_M_REV[0-9][0-9]_SMITHED_V01.bc$", "AS15_M_REV[0-9][0-9]_SMITHED_V02.bc$"] } }, - "tspk": { - "kernels": ["moon_pa_de421_1900-2050.bpc", "de421.bsp"] - }, - "pck": { - "kernels": ["moon_080317.tf$", "moon_assoc_me.tf$"], - "deps" : ["/base/pck"] - }, "fk": { "kernels": ["apollo15.[0-9]{4}.tf", "apollo15_v2.[0-9]{4}.tf"] }, @@ -30,22 +23,22 @@ "kernels": ["apollo15.[0-9]{4}.tsc"] } }, - "metric": { + "apollo15_metric": { "ik": { "kernels": ["apollo15_metric.[0-9]{4}.ti$"] }, "iak" : { "kernels" : "apollo15MetricAddendum[0-9]{3}.ti$" - } + }, + "deps" : ["/apollo15"] }, - "panoramic": { + "apollo15_panoramic": { "ik": { "kernels": ["apollo15_panoramic.[0-9]{4}.ti$"] - } - }, - "apollo_pan": { + }, "iak": { "kernels": "apolloPanAddendum[0-9]{3}.ti$" - } + }, + "deps" : ["/apollo15"] } } \ No newline at end of file diff --git a/SpiceQL/db/apollo16.json b/SpiceQL/db/apollo16.json index 205f109..c7cde0a 100644 --- a/SpiceQL/db/apollo16.json +++ b/SpiceQL/db/apollo16.json @@ -30,7 +30,7 @@ ] } }, - "metric": { + "apollo16_metric": { "ik": { "kernels": [ "apollo16_metric.[0-9]{4}.ti", @@ -44,13 +44,10 @@ "deps" : ["/base/pck"] } }, - "panoramic": { + "apollo16_panoramic": { "ik": { "kernels": "apollo16_panoramic.[0-9]{4}.ti" }, - "deps" : ["/apollo16"] - }, - "apollo_pan": { "iak": { "kernels": "apolloPanAddendum[0-9]{3}.ti" }, diff --git a/SpiceQL/db/apollo17.json b/SpiceQL/db/apollo17.json index cc4fd17..21bdbee 100644 --- a/SpiceQL/db/apollo17.json +++ b/SpiceQL/db/apollo17.json @@ -28,14 +28,13 @@ } } }, - - "metric": { + "apollo17_metric": { "iak": { "kernels": "apollo17MetricAddendum[0-9]{3}.ti" }, "deps" : ["/apollo17"] }, - "panoramic": { + "apollo17_panoramic": { "ik": { "kernels": [ "apollo17_metric.[0-9]{4}.ti", @@ -43,9 +42,6 @@ "apollo17_panoramic.[0-9]{4}.ti" ] }, - "deps" : ["/apollo17"] - }, - "apollo_pan": { "iak": { "kernels": "apolloPanAddendum[0-9]{3}.ti" }, diff --git a/SpiceQL/db/base.json b/SpiceQL/db/base.json index c551a87..d67ae6a 100644 --- a/SpiceQL/db/base.json +++ b/SpiceQL/db/base.json @@ -3,13 +3,401 @@ "lsk" : { "kernels" : ["naif[0-9]{4}.tls"] }, - "spk" : { + "tspk" : { "noquality" : { - "kernels" : ["^de[0-9]{3}.bsp$", "^mar[0-9]{3}.bsp$", "^nep[0-9]{3}.bsp$", "^sat[0-9]{3}.bsp$", "^ura[0-9]{3}.bsp$"] + "kernels" : ["^de[0-9]{3}.bsp$"] } }, "pck" : { "kernels" : ["pck0000[0-9].tpc"] } + }, + "mars" : { + "tspk" : { + "noquality": { + "kernels" : ["^mar[0-9]{3}.bsp$"] + } + }, + "deps" : ["/base"] + }, + "moon" : { + "tspk" : { + "noquality": { + "kernels": ["moon_pa_de421_1900-2050.bpc$"] + } + }, + "pck" : { + "kernels" : ["^moon_080317.tf$", "^moon_assoc_me.tf$"] + }, + "deps" : ["/base"] + }, + "iau_moon" : { + "deps" : ["/moon"] + }, + "neptune" : { + "tspk" : { + "noquality": { + "kernels": ["^nep[0-9]{3}.bsp$"] + }, + "deps" : ["/base"] + } + }, + "saturn" : { + "tspk" : { + "noquality": { + "kernels": ["^sat[0-9]{3}.bsp$"] + } + }, + "deps" : ["/base"] + }, + "uranus" : { + "tspk" : { + "noquality": { + "kernels": ["^ura[0-9]{3}.bsp$"] + } + }, + "deps" : ["/base"] + }, + "jupiter" : { + "tspk" : { + "noquality": { + "kernels": ["^jup[0-9]{3}.bsp$"] + } + }, + "deps" : ["/base"] + }, + "pluto" : { + "tspk" : { + "noquality": { + "kernels": ["^plu[0-9]{3}.bsp$"] + } + }, + "deps" : ["/base"] + }, + "io" : { + "deps" : ["/jupiter"] + }, + "europa" : { + "deps" : ["/jupiter"] + }, + "ganymede" : { + "deps" : ["/jupiter"] + }, + "callisto" : { + "deps" : ["/jupiter"] + }, + "amalthea" : { + "deps" : ["/jupiter"] + }, + "thebe" : { + "deps" : ["/jupiter"] + }, + "humalia" : { + "deps" : ["/jupiter"] + }, + "pasipae" : { + "deps" : ["/jupiter"] + }, + "sinope" : { + "deps" : ["/jupiter"] + }, + "lysithea" : { + "deps" : ["/jupiter"] + }, + "cerme" : { + "deps" : ["/jupiter"] + }, + "ananke" : { + "deps" : ["/jupiter"] + }, + "leda" : { + "deps" : ["/jupiter"] + }, + "ardrastea" : { + "deps" : ["/jupiter"] + }, + "metis" : { + "deps" : ["/jupiter"] + }, + "phobos" : { + "deps" : ["/mars"] + }, + "deimos" : { + "deps" : ["/mars"] + }, + "mimas" : { + "deps" : ["/saturn"] + }, + "enceladus" : { + "deps" : ["/saturn"] + }, + "tethys" : { + "deps" : ["/saturn"] + }, + "dione" : { + "deps" : ["/saturn"] + }, + "rhea" : { + "deps" : ["/saturn"] + }, + "titan" : { + "deps" : ["/saturn"] + }, + "hyperion" : { + "deps" : ["/saturn"] + }, + "iapetus" : { + "deps" : ["/saturn"] + }, + "phoebe" : { + "deps" : ["/saturn"] + }, + "helene" : { + "deps" : ["/saturn"] + }, + "telesto" : { + "deps" : ["/saturn"] + }, + "calypso" : { + "deps" : ["/saturn"] + }, + "methone" : { + "deps" : ["/saturn"] + }, + "polydeuces" : { + "deps" : ["/saturn"] + }, + "janus" : { + "deps" : ["/saturn"] + }, + "epimetheus" : { + "deps" : ["/saturn"] + }, + "atlas" : { + "deps" : ["/saturn"] + }, + "prometheus" : { + "deps" : ["/saturn"] + }, + "pandora" : { + "deps" : ["/saturn"] + }, + "pallene" : { + "deps" : ["/saturn"] + }, + "anthe" : { + "deps" : ["/saturn"] + }, + "aegaeon" : { + "deps" : ["/saturn"] + }, + "naiad" : { + "deps" : ["/neptune"] + }, + "thalassa" : { + "deps" : ["/neptune"] + }, + "despina" : { + "deps" : ["/neptune"] + }, + "galatea" : { + "deps" : ["/neptune"] + }, + "larissa" : { + "deps" : ["/neptune"] + }, + "proteus" : { + "deps" : ["/neptune"] + }, + "halimede" : { + "deps" : ["/neptune"] + }, + "psamathe" : { + "deps" : ["/neptune"] + }, + "sao" : { + "deps" : ["/neptune"] + }, + "laomedeia" : { + "deps" : ["/neptune"] + }, + "neso" : { + "deps" : ["/neptune"] + }, + "triton" : { + "deps" : ["/neptune"] + }, + "nereid" : { + "deps" : ["/neptune"] + }, + "ariel" : { + "deps" : ["/uranus"] + }, + "umbriel" : { + "deps" : ["/uranus"] + }, + "titania" : { + "deps" : ["/uranus"] + }, + "oberon" : { + "deps" : ["/uranus"] + }, + "caliban" : { + "deps" : ["/uranus"] + }, + "sycorax" : { + "deps" : ["/uranus"] + }, + "prospero" : { + "deps" : ["/uranus"] + }, + "setebos" : { + "deps" : ["/uranus"] + }, + "stephano" : { + "deps" : ["/uranus"] + }, + "trinculo" : { + "deps" : ["/uranus"] + }, + "francisco" : { + "deps" : ["/uranus"] + }, + "margaret" : { + "deps" : ["/uranus"] + }, + "ferdinand" : { + "deps" : ["/uranus"] + }, + "cordelia" : { + "deps" : ["/uranus"] + }, + "ophelia" : { + "deps" : ["/uranus"] + }, + "bianca" : { + "deps" : ["/uranus"] + }, + "cressida" : { + "deps" : ["/uranus"] + }, + "juliet" : { + "deps" : ["/uranus"] + }, + "rosalind" : { + "deps" : ["/uranus"] + }, + "belinda" : { + "deps" : ["/uranus"] + }, + "puck" : { + "deps" : ["/uranus"] + }, + "perdita" : { + "deps" : ["/uranus"] + }, + "mab" : { + "deps" : ["/uranus"] + }, + "cupid" : { + "deps" : ["/uranus"] + }, + "chariklo" : { + "tspk" : { + "noquality" : { + "kernels" : ["^kbo_centaur_20131129.bsp$", "^de418.bsp$"] + } + } + }, + "haumea" : { + "deps" : ["/chariklo"] + }, + "makemake" : { + "deps" : ["/chariklo"] + }, + "arawn" : { + "tspk" : { + "noquality" : { + "kernels" : ["^kbo_centaur_20170422.bsp$", "^de418.bsp$"] + } + } + }, + "jj124" : { + "deps" : ["/arawn"] + }, + "chiron" : { + "deps" : ["/arawn"] + }, + "ixion" : { + "deps" : ["/arawn"] + }, + "astroid_307261" : { + "deps" : ["/arawn"] + }, + "quaoar" : { + "deps" : ["/arawn"] + }, + "astroid_486958" : { + "deps" : ["/arawn"] + }, + "mu69" : { + "tspk" : { + "noquality" : { + "kernels" : ["^sb_2014mu69_20150903_s6.bsp$", "^de418.bsp$"] + } + } + }, + "steins" : { + "tspk" : { + "noquality": { + "kernels" : ["^2867_STEINS_2004_2016.BSP$", "^ORHO_______________[a-zA-Z0-9]{5}.BSP$"] + } + }, + "pck" : { + "kernels" : ["ROS_STEINS_V[a-zA-Z0-9]{2}.TPC$"] + }, + "deps" : ["/base"] + }, + "lutetia" : { + "tspk" : { + "noquality": { + "kernels" : ["^21_LUTETIA_2004_2016.BSP$", "^ORHS_______________[a-zA-Z0-9]{5}.BSP$"] + } + }, + "pck" : { + "kernels" : ["ROS_LUTETIA_RSOC_V[a-zA-Z0-9]{2}.TPC$"] + }, + "fk" : { + "kernels" : ["ROS_LUTETIA_RSOC_V[a-zA-Z0-9]{2}.TF$"] + }, + "deps" : ["/base"] + }, + "67P/CHURYUMOV-GERASIMENKO 1 (1969 R1)" : { + "tspk" : { + "noquality": { + "kernels" : ["^67P_CHURY_GERAS_2004_2016.BSP$", "^CATT_DV_197_01_______[a-zA-Z0-9]{5}.BC$"] + } + }, + "fk" : { + "kernels" : ["^ROS_V[0-9]{2}.TF$$"] + }, + "pck" : { + "kernels" : ["^ROS_CG_RAD_V[a-zA-Z0-9]{2}.TPC$", "^CATT_DV_257_03_______[a-zA-Z0-9]{5}.BC$"] + }, + "deps" : ["/base"] + }, + "67P/CHURYUMOV-GERASIMENKO (1969 R1)" : { + "tspk" : { + "noquality": { + "kernels" : ["^CORB_DV_257_03___T19_[a-zA-Z0-9]{5}.BSP$"] + } + }, + "fk" : { + "kernels" : ["^ROS_V[0-9]{2}.TF$$"] + }, + "pck" : { + "kernels" : ["^ROS_CG_RAD_V[a-zA-Z0-9]{2}.TPC$", "^CATT_DV_223_02_______[a-zA-Z0-9]{5}.BC$"] + }, + "deps" : ["/base"] } } \ No newline at end of file diff --git a/SpiceQL/db/cassini.json b/SpiceQL/db/cassini.json index e90bcc0..a9cd0a0 100644 --- a/SpiceQL/db/cassini.json +++ b/SpiceQL/db/cassini.json @@ -29,7 +29,6 @@ ] }, "pck": { - "kernels": "^pck[0-9]{5}.tpc$", "smithed": { "kernels": "^cpck15Dec2017_2019Shape.tpc$" } diff --git a/SpiceQL/db/chandrayaan1.json b/SpiceQL/db/chandrayaan1.json index 46f72fd..4dc3cfc 100644 --- a/SpiceQL/db/chandrayaan1.json +++ b/SpiceQL/db/chandrayaan1.json @@ -8,14 +8,8 @@ "fk" : { "kernels" : ["chand1_v001.tf$"] }, - "pck" : { - "kernels" : ["moon_080317.tf$", "moon_assoc_me.tf$"] - }, "sclk" : { "kernels" : ["aig_ch1_sclk_complete_biased_m1p816.tsc$"] - }, - "tspk" : { - "kernels" : ["moon_pa_de421_1900-2050.bpc", "de421.bsp"] } }, "mrffr" : { diff --git a/SpiceQL/db/dawn.json b/SpiceQL/db/dawn.json index 90f9ffd..0567e2f 100644 --- a/SpiceQL/db/dawn.json +++ b/SpiceQL/db/dawn.json @@ -11,9 +11,6 @@ "kernels" : ["dawn_rec_[0-9]{6}-.*.bsp$"] } }, - "pck": { - "kernels": ["pck[0-9]{5}$", "dawn_vesta_v[0-9]{2}.tpc$", "dawn_vesta_v[0-9]{2}.tf$", "dawn_ceres_v[0-9]{2}.tpc$", "dawn_ceres_v[0-9]{2}.tf$"] - }, "ck" : { "reconstructed" : { "kernels" : ["dawn_sc_[0-9]{6}_[0-9]{6}.bc$"] @@ -61,5 +58,15 @@ "kernels": ["dawn_vir_v[0-9]{2}.ti$"] }, "deps" : ["/dawn"] + }, + "dawn_vesta" : { + "pck" : { + "kernels" : ["dawn_vesta_v[0-9]{2}.tpc$", "dawn_vesta_v[0-9]{2}.tf$"] + } + }, + "dawn_ceres" : { + "pck": { + "kernels": ["dawn_ceres_v[0-9]{2}.tpc$", "dawn_ceres_v[0-9]{2}.tf$"] + } } } \ No newline at end of file diff --git a/SpiceQL/db/galileo.json b/SpiceQL/db/galileo.json index f73e38c..1caef9a 100644 --- a/SpiceQL/db/galileo.json +++ b/SpiceQL/db/galileo.json @@ -8,7 +8,7 @@ "kernels" : ["ck[0-9]{5}.*\\.bc", "CKmerge_type3.plt.bck"] }, "smithed" : { - "kernels" : ["galssi_.*med.bck","galssi_io.*[0-9]{6}.*\\.bck","galssi_eur_.*\\.bc"] + "kernels" : ["^galssi_.*med.bck$","^galssi_io.*[0-9]{6}.*\\.bck$","^galssi_eur_.*\\.bc$", "^galssi_eur_.*\\.bck$"] } }, "spk" : { @@ -22,9 +22,6 @@ "pck" : { "smithed" : { "kernels" : "pck00010_msgr_v[0-9]{2}.tpc" - }, - "noquality" : { - "kernels" : "pck0000[0-9].tpc" } } } diff --git a/SpiceQL/db/hayabusa.json b/SpiceQL/db/hayabusa.json index 6c0c50d..542dd50 100644 --- a/SpiceQL/db/hayabusa.json +++ b/SpiceQL/db/hayabusa.json @@ -1,7 +1,7 @@ { "hayabusa": { "tspk": { - "kernels": ["de403s.bsp", "sb_25143_140.bsp"] + "kernels": ["sb_25143_140.bsp"] }, "lsk": { "kernels": ["naif[0-9]{4}.tls"] diff --git a/SpiceQL/db/juno.json b/SpiceQL/db/juno.json index 62ac1ec..1054f0f 100644 --- a/SpiceQL/db/juno.json +++ b/SpiceQL/db/juno.json @@ -22,16 +22,11 @@ "iak" : { "kernels" : "junoAddendum[0-9]{3}.ti$" }, - "pck" : { - "noquality": { - "kernels" : "pck000[0-9]{2}.tpc$" - } - }, "sclk" : { "kernels" : "jno_sclkscet_[0-9]{5}.tsc$" }, "tspk" : { - "kernels" : ["de4[3-4][0-9]s.bsp$", "juno_struct_v[0-9]{2}.bsp$", "jup[0-9]{3}.bsp$"] + "kernels" : ["juno_struct_v[0-9]{2}.bsp$", "jup[0-9]{3}.bsp$"] } } } diff --git a/SpiceQL/db/kaguya.json b/SpiceQL/db/kaguya.json index b425f2f..546bbe2 100644 --- a/SpiceQL/db/kaguya.json +++ b/SpiceQL/db/kaguya.json @@ -22,13 +22,6 @@ "SEL_TC_V[0-9]{2}.TI" ] }, - "pck": { - "kernels": [ - "pck[0-9]{5}.tpc", - "moon_080317.tf", - "moon_assoc_me.tf" - ] - }, "sclk": { "kernels": [ "SEL_M_V01.TSC", @@ -41,12 +34,6 @@ "SEL_M_071020_090610_SGMH_02.BSP", "SELMAINGRGM900CL660DIRALT2008103020090610.bsp"] } - }, - "tspk": { - "kernels": [ - "moon_pa_de421_1900-2050.bpc", - "de421.bsp" - ] } } } \ No newline at end of file diff --git a/SpiceQL/db/lo.json b/SpiceQL/db/lo.json index 3ded902..b6fd717 100644 --- a/SpiceQL/db/lo.json +++ b/SpiceQL/db/lo.json @@ -8,9 +8,6 @@ "pck" : { "deps" : ["/base/pck"] }, - "lsk": { - "kernels": ["naif[0-9]{4}.tls$"] - }, "iak": { "kernels": ["lunarOrbiterAddendum[0-9]{3}.ti$"] }, diff --git a/SpiceQL/db/lro.json b/SpiceQL/db/lro.json index cf3421b..0ef4331 100644 --- a/SpiceQL/db/lro.json +++ b/SpiceQL/db/lro.json @@ -24,9 +24,6 @@ "kernels" : ["LRO_.*_GRGM660.*.bsp$", "LRO_.*_GRGM900C.*.BSP$"] } }, - "pck" : { - "kernels" : ["moon_080317.tf$", "moon_assoc_me.tf$"] - }, "deps" : ["/lro"] }, "lroc" : { @@ -35,9 +32,6 @@ "kernels" : ["lrolc_[0-9]{7}_[0-9]{7}_v[0-9]{2}.bc$", "soc31_[0-9]{7}_[0-9]{7}_v[0-9]{2}.bc$"] } }, - "tspk" : { - "kernels" : ["de421.bsp$", "moon_pa_de421_1900-2050.bpc$"] - }, "ik" : { "kernels" : ["lro_lroc_v[0-9]{2}.ti$"] }, diff --git a/SpiceQL/db/mess.json b/SpiceQL/db/mess.json index fd9402b..9850788 100644 --- a/SpiceQL/db/mess.json +++ b/SpiceQL/db/mess.json @@ -14,7 +14,7 @@ } }, "tspk" : { - "kernels" : ["de423s.bsp", "des405.bsp"] + "kernels" : ["des405.bsp"] }, "fk" : { "kernels" : "msgr_v[0-9]{3}.tf" diff --git a/SpiceQL/db/msl.json b/SpiceQL/db/msl.json index 43516fd..2c0aac6 100644 --- a/SpiceQL/db/msl.json +++ b/SpiceQL/db/msl.json @@ -36,7 +36,7 @@ "msl_[a-z]{3}_[0-9]{8}_c[0-9]{2}.ti$"] }, "lsk":{ - "kernels":"msl.tls(.history)?$" + "kernels":"msl.tls$" }, "spk":{ "kernels":["msl_struct_v[0-9]{2}.bsp$", diff --git a/SpiceQL/db/near.json b/SpiceQL/db/near.json index 7055bf2..debc8b2 100644 --- a/SpiceQL/db/near.json +++ b/SpiceQL/db/near.json @@ -15,9 +15,6 @@ }, "fk" : { "kernels" : ["eros_fixed.tf$"] - }, - "pck" : { - "kernels" : ["pck[0-9]{5}.tpc$"] } }, "msi": { diff --git a/SpiceQL/db/newhorizons.json b/SpiceQL/db/newhorizons.json index c62541c..ed97d11 100644 --- a/SpiceQL/db/newhorizons.json +++ b/SpiceQL/db/newhorizons.json @@ -1,10 +1,7 @@ { "newhorizons": { - "tspk": { - "kernels": ["de413.bsp$", "de418.bsp$", "jup260.bsp$", "nh_nep_ura_000.bsp$", "nh_plu017.bsp$", "kbo_centaur_[0-9]{8}.bsp$", "nh_extras.bsp$", "sb_2014mu69_20150903_s6.bsp$"] - }, "pck": { - "kernels": ["pck[0-9]{5}.tpc$", "nh_stars_kbo_centaur_v[0-9]{3}.tpc$", "nh_pcnh_[0-9]{3}.tpc$"] + "kernels": ["nh_stars_kbo_centaur_v[0-9]{3}.tpc$", "nh_pcnh_[0-9]{3}.tpc$"] }, "fk": { "kernels": ["nh_v[0-9]{3}.tf$", "nh_soc_misc_v[0-9]{3}.tf$"] @@ -67,5 +64,48 @@ "kernels" : ["leisaAddendum[0-9]{3}.ti$"] }, "deps" : ["/newhorizons"] + }, + "nh_uranus" : { + "tspk" : { + "noquality" : { + "kernels" : ["^nh_nep_ura_000.bsp$", "^de413.bsp$"] + } + } + }, + "nh_neptune" : { + "tspk" : { + "noquality" : { + "kernels" : ["^nh_nep_ura_000.bsp$", "^de413.bsp$"] + } + } + }, + "nh_pluto" : { + "tspk" : { + "noquality" : { + "kernels" : ["^nh_plu017.bsp$", "^de413.bsp$"] + } + } + }, + "nh_charon" : { + "deps" : ["/pluto"] + }, + "nh_nix" : { + "deps" : ["/pluto"] + }, + "nh_hydra" : { + "deps" : ["/pluto"] + }, + "nh_callirrhoe" :{ + "tspk" : { + "noquality" : { + "kernels" : ["^nh_extras.bsp$", "^de418.bsp$"] + } + } + }, + "nh_styx" : { + "deps" : ["/nh_callirrhoe"] + }, + "nh_kerberos" : { + "deps" : ["/nh_callirrhoe"] } } \ No newline at end of file diff --git a/SpiceQL/db/rosetta.json b/SpiceQL/db/rosetta.json index b8b7904..b82ea4d 100644 --- a/SpiceQL/db/rosetta.json +++ b/SpiceQL/db/rosetta.json @@ -30,30 +30,6 @@ "RORB_D[a-zA-Z0-9]_[a-zA-Z0-9]{3}_[a-zA-Z0-9]{2}_[a-zA-Z0-9]_*[a-zA-Z0-9]{5}.BSP$", "RORB_D[a-zA-Z0-9]_[a-zA-Z0-9]{3}_[a-zA-Z0-9]{2}_[a-zA-Z0-9]_T19_[0-9]{5}.BSP$"] } - }, - "tspk" : { - "kernels" : [ - "DE[0-9]{3}.BSP$", - "2867_STEINS_2004_2016.BSP$", - "ORHO_______________[a-zA-Z0-9]{5}.BSP$", - "21_LUTETIA_2004_2016.BSP$", - "67P_CHURY_GERAS_2004_2016.BSP$", - "CATT_DV_197_01_______[a-zA-Z0-9]{5}.BC$", - "CORB_DV_257_03___T19_[a-zA-Z0-9]{5}.BSP$" - ] - }, - "pck" : { - "reconstructed": { - "kernels" : ["CATT_DV_145_02_______[a-zA-Z0-9]{5}.BC$", - "CATT_DV_223_02_______[a-zA-Z0-9]{5}.BC$", - "CATT_DV_257_03_______[a-zA-Z0-9]{5}.BC$", - "PCK[a-zA-Z0-9]{5}.TPC$", - "ROS_STEINS_V[a-zA-Z0-9]{2}.TPC$", - "ROS_LUTETIA_RSOC_V[a-zA-Z0-9]{2}.TPC$", - "ROS_LUTETIA_RSOC_V[a-zA-Z0-9]{2}.TF$", - "ROS_CG_RAD_V[a-zA-Z0-9]{2}.TPC$" - ] - } } }, "osinac": { diff --git a/SpiceQL/db/schema/spiceMissionSchmea.schema.json b/SpiceQL/db/schema/spiceMissionSchmea.schema.json index ce4d233..371b4f4 100644 --- a/SpiceQL/db/schema/spiceMissionSchmea.schema.json +++ b/SpiceQL/db/schema/spiceMissionSchmea.schema.json @@ -52,7 +52,7 @@ "$ref": "#/definitions/quality_kernels" }, "tspk": { - "$ref": "#/definitions/kernels" + "$ref": "#/definitions/quality_kernels" }, "fk": { "$ref": "#/definitions/kernels" diff --git a/SpiceQL/include/inventory.h b/SpiceQL/include/inventory.h index dd6d499..7bed9ec 100644 --- a/SpiceQL/include/inventory.h +++ b/SpiceQL/include/inventory.h @@ -13,12 +13,14 @@ #include +#include "spice_types.h" namespace SpiceQL { namespace Inventory { - nlohmann::json search_for_kernelset(std::string spiceql_mission, std::vector types, double start_time=-std::numeric_limits::max(), double stop_time=std::numeric_limits::max(), + nlohmann::json search_for_kernelset(std::string spiceql_name, std::vector types=KERNEL_TYPES, double start_time=-std::numeric_limits::max(), double stop_time=std::numeric_limits::max(), std::string ckQuality="smithed", std::string spkQuality="smithed", bool enforce_quality=false); - + nlohmann::json search_for_kernelsets(std::vector spiceql_names, std::vector types=KERNEL_TYPES, double start_time=-std::numeric_limits::max(), double stop_time=std::numeric_limits::max(), + std::string ckQuality="smithed", std::string spkQuality="smithed", bool enforce_quality=false, bool overwrite=false); std::string getDbFilePath(); void create_database(); diff --git a/SpiceQL/include/inventoryimpl.h b/SpiceQL/include/inventoryimpl.h index b38c724..ce3a70a 100644 --- a/SpiceQL/include/inventoryimpl.h +++ b/SpiceQL/include/inventoryimpl.h @@ -40,9 +40,10 @@ namespace SpiceQL { InventoryImpl(bool force_regen=false); template T getKey(std::string key); void write_database(); - nlohmann::json search_for_kernelset(std::string instrument, std::vector types, double start_time=-std::numeric_limits::max(), double stop_time=std::numeric_limits::max(), + nlohmann::json search_for_kernelset(std::string spiceql_name, std::vector types, double start_time=-std::numeric_limits::max(), double stop_time=std::numeric_limits::max(), Kernel::Quality ckQuality=Kernel::Quality::SMITHED, Kernel::Quality spkQuality=Kernel::Quality::SMITHED, bool enforce_quality=false); - + nlohmann::json search_for_kernelsets(std::vector spiceql_names, std::vector types, double start_time=-std::numeric_limits::max(), double stop_time=std::numeric_limits::max(), + Kernel::Quality ckQuality=Kernel::Quality::SMITHED, Kernel::Quality spkQuality=Kernel::Quality::SMITHED, bool enforce_quality=false, bool overwrite=false); nlohmann::json m_json_inventory; std::map> m_nontimedep_kerns; diff --git a/SpiceQL/include/query.h b/SpiceQL/include/query.h index a0054d6..210c33f 100644 --- a/SpiceQL/include/query.h +++ b/SpiceQL/include/query.h @@ -92,7 +92,7 @@ namespace SpiceQL { * * @param root Directory with kernels somewhere in the directory or its subdirectories * @param conf JSON config file, usually this is a JSON object read from one of the db files that shipped with the library - * @param kernelType Some CK kernel type, see Kernel::TYPES + * @param kernelType Some CK kernel type, see KERNEL_TYPES **/ nlohmann::json globKernels(std::string root, nlohmann::json conf, std::string kernelType); diff --git a/SpiceQL/include/spice_types.h b/SpiceQL/include/spice_types.h index c047d92..2391a1a 100644 --- a/SpiceQL/include/spice_types.h +++ b/SpiceQL/include/spice_types.h @@ -15,7 +15,10 @@ * */ namespace SpiceQL { - void load(std::string path, bool force_refurnsh); + extern const std::vector KERNEL_TYPES; + extern const std::vector KERNEL_QUALITIES; + + void load(std::string path, bool force_refurnsh=true); void unload(std::string path); /** @@ -51,17 +54,6 @@ namespace SpiceQL { SMITHED = 4, // Controlled Kernels }; - /** - * used for converting string and int kernal quality - */ - static const std::vector QUALITIES; - - /** - * used for converting between string and int kernal types - */ - static const std::vector TYPES; - - /** * @brief Switch between Kernel type enum to string * diff --git a/SpiceQL/src/inventory.cpp b/SpiceQL/src/inventory.cpp index 507eb43..80d1b09 100644 --- a/SpiceQL/src/inventory.cpp +++ b/SpiceQL/src/inventory.cpp @@ -15,7 +15,7 @@ using namespace std; namespace SpiceQL { namespace Inventory { - nlohmann::json search_for_kernelset(std::string instrument, std::vector types, double start_time, double stop_time, string ckQuality, string spkQuality, bool enforce_quality) { + json search_for_kernelset(string instrument, vector types, double start_time, double stop_time, string ckQuality, string spkQuality, bool enforce_quality) { InventoryImpl impl; vector enum_types; Kernel::Quality enum_ck_quality = Kernel::translateQuality(ckQuality); @@ -27,9 +27,23 @@ namespace SpiceQL { return impl.search_for_kernelset(instrument, enum_types, start_time, stop_time, enum_ck_quality, enum_spk_quality, enforce_quality); } - + + json search_for_kernelsets(vector spiceql_names, vector types, double start_time, double stop_time, + string ckQuality, string spkQuality, bool enforce_quality, bool overwrite) { + InventoryImpl impl; + Kernel::Quality enum_ck_quality = Kernel::translateQuality(ckQuality); + Kernel::Quality enum_spk_quality = Kernel::translateQuality(spkQuality); + vector enum_types; + for (auto &e:types) { + enum_types.push_back(Kernel::translateType(e)); + } + + json kernels = impl.search_for_kernelsets(spiceql_names, enum_types, start_time, stop_time, enum_ck_quality, enum_spk_quality, enforce_quality, overwrite); + return kernels; + } + string getDbFilePath() { - static std::string db_path = fs::path(getCacheDir()) / DB_HDF_FILE; + static string db_path = fs::path(getCacheDir()) / DB_HDF_FILE; return db_path; } diff --git a/SpiceQL/src/inventoryimpl.cpp b/SpiceQL/src/inventoryimpl.cpp index 52416aa..481651c 100644 --- a/SpiceQL/src/inventoryimpl.cpp +++ b/SpiceQL/src/inventoryimpl.cpp @@ -159,7 +159,7 @@ namespace SpiceQL { for(auto &[kernel_type, kernel_obj] : kernels.items()) { if (kernel_type == "ck" || kernel_type == "spk") { // we need to log the times - for (auto &quality : Kernel::QUALITIES) { + for (auto &quality : KERNEL_QUALITIES) { if (kernel_obj.contains(quality)) { // make the keys match Config's nested keys @@ -225,16 +225,54 @@ namespace SpiceQL { dataset.read(data); return data; } catch (exception &e) { - throw runtime_error("Failed to key [" + key + "] from [" + hdf_file + "]."); + throw runtime_error("Failed to get key [" + key + "] from [" + hdf_file + "]."); } } + json InventoryImpl::search_for_kernelsets(vector spiceql_names, vector types, double start_time, double stop_time, + Kernel::Quality ckQuality, Kernel::Quality spkQuality, bool enforce_quality, bool overwrite) { + json kernels; + // simply iterate over the names + for(auto &name : spiceql_names) { + json subKernels = search_for_kernelset(name, types, start_time, stop_time, + ckQuality, spkQuality, enforce_quality); + SPDLOG_TRACE("subkernels for {}: {}", name, subKernels.dump(4)); + SPDLOG_TRACE("Overwrite? {}", overwrite); + if(overwrite) { + SPDLOG_TRACE("Overwriting Kernels"); + kernels.merge_patch(subKernels); + } + else { + if(kernels.is_null()) { + kernels = subKernels; + continue; + } + + SPDLOG_TRACE("Merging Kernels"); + for(auto &[k, v] : subKernels.items()) { + if(kernels.contains(k) && kernels[k].is_array()) { + // create a set for quick lookups for duplicates + std::unordered_set k_set(kernels[k].begin(), kernels[k].end()); + SPDLOG_DEBUG("Merging {} and {}", kernels[k].dump(), v.dump()); + for(auto & e: v) { + if(!k_set.contains(e)) kernels[k].push_back(e); + } + } + else { + kernels[k] = v; + } + } + } + } + return kernels; + } + - json InventoryImpl::search_for_kernelset(string instrument, vector types, double start_time, double stop_time, + json InventoryImpl::search_for_kernelset(string spiceql_name, vector types, double start_time, double stop_time, Kernel::Quality ckQuality, Kernel::Quality spkQuality, bool enforce_quality) { // get time dep kernels first json kernels; - instrument = toLower(instrument); + spiceql_name = toLower(spiceql_name); fs::path data_dir = getDataDirectory(); @@ -250,15 +288,15 @@ namespace SpiceQL { bool found = false; Kernel::Quality quality = spkQuality; - string qkey = "spkQuality"; + string qkey = spiceql_name+"_spk_quality"; if (type == Kernel::Type::CK) { quality = ckQuality; - qkey = "ckQuality"; + qkey = spiceql_name+"_ck_quality"; } // iterate down the qualities for(int i = (int)quality; i >= 0 && !found; i--) { - string key = instrument+"/"+Kernel::translateType(type)+"/"+Kernel::QUALITIES.at(i)+"/"+"kernels"; + string key = spiceql_name+"/"+Kernel::translateType(type)+"/"+KERNEL_QUALITIES.at(i)+"/"+"kernels"; SPDLOG_DEBUG("Key: {}", key); quality = (Kernel::Quality)i; @@ -357,7 +395,7 @@ namespace SpiceQL { } else { // text/non time based kernels SPDLOG_DEBUG("Trying to search time independant kernels"); - string key = instrument+"/"+Kernel::translateType(type)+"/"+"kernels"; + string key = spiceql_name+"/"+Kernel::translateType(type)+"/"+"kernels"; SPDLOG_DEBUG("GETTING {} with key {}", Kernel::translateType(type), key); if (m_nontimedep_kerns.contains(key) && !m_nontimedep_kerns[key].empty()) { vector ks = m_nontimedep_kerns[key]; diff --git a/SpiceQL/src/query.cpp b/SpiceQL/src/query.cpp index a03c0e1..b6a74b8 100644 --- a/SpiceQL/src/query.cpp +++ b/SpiceQL/src/query.cpp @@ -168,7 +168,7 @@ namespace SpiceQL { } // iterate over potential qualities - for(auto qual: Kernel::QUALITIES) { + for(auto qual: KERNEL_QUALITIES) { if(!category.contains(qual)) { continue; } @@ -211,14 +211,6 @@ namespace SpiceQL { vector getKernelsAsVector(json kernels) { SPDLOG_TRACE("geKernelsAsVector json: {}", kernels.dump()); - // Remove ckQuality and spkQuality properties - if (kernels.contains("ckQuality")) { - kernels.erase("ckQuality"); - } - if (kernels.contains("spkQuality")) { - kernels.erase("spkQuality"); - } - vector pointers = findKeyInJson(kernels, "kernels"); vector kernelVect; @@ -239,7 +231,7 @@ namespace SpiceQL { } for (auto& [key, val] : kernels.items()) { SPDLOG_TRACE("Getting Kernels of Type: {}", key); - if(!val.empty()) { + if(!val.empty() && val.is_array()) { vector ks = jsonArrayToVector(val); for (auto &kernel : ks) { SPDLOG_TRACE("Adding: {}", kernel); diff --git a/SpiceQL/src/spice_types.cpp b/SpiceQL/src/spice_types.cpp index 4ec5388..d38e32b 100644 --- a/SpiceQL/src/spice_types.cpp +++ b/SpiceQL/src/spice_types.cpp @@ -42,12 +42,12 @@ namespace SpiceQL { } - const std::vector Kernel::TYPES = { "na", "ck", "spk", "tspk", + const std::vector KERNEL_TYPES = { "na", "ck", "spk", "tspk", "lsk", "mk", "sclk", "iak", "ik", "fk", "dsk", "pck", "ek"}; - const std::vector Kernel::QUALITIES = { "noquality", + const std::vector KERNEL_QUALITIES = { "noquality", "predicted", "nadir", "reconstructed", @@ -55,12 +55,12 @@ namespace SpiceQL { string Kernel::translateType(Kernel::Type type) { - return Kernel::TYPES[static_cast(type)]; + return KERNEL_TYPES[static_cast(type)]; } Kernel::Type Kernel::translateType(string type) { - auto res = findInVector(Kernel::TYPES, type); + auto res = findInVector(KERNEL_TYPES, type); if (res.first) { return static_cast(res.second); } @@ -70,7 +70,7 @@ namespace SpiceQL { string Kernel::translateQuality(Kernel::Quality qa) { - return Kernel::QUALITIES[static_cast(qa)]; + return KERNEL_QUALITIES[static_cast(qa)]; } @@ -78,12 +78,13 @@ namespace SpiceQL { if (qa.empty()) { qa = "smithed"; } - auto res = findInVector(Kernel::QUALITIES, qa); + auto res = findInVector(KERNEL_QUALITIES, qa); + if (res.first) { return static_cast(res.second); } - throw invalid_argument(fmt::format("{} is not a valid kernel type, available types are: {}", qa, fmt::join(Kernel::QUALITIES, ", "))); + throw invalid_argument(fmt::format("{} is not a valid kernel type, available types are: {}", qa, fmt::join(KERNEL_QUALITIES, ", "))); } @@ -330,6 +331,7 @@ namespace SpiceQL { baseKernels = Inventory::search_for_kernelset("base", {"fk"}); missionKernels = Inventory::search_for_kernelset(mission, {"fk"}); } + KernelSet baseKset(baseKernels); KernelSet missionKset(missionKernels); diff --git a/SpiceQL/src/utils.cpp b/SpiceQL/src/utils.cpp index 75308c3..ee72a82 100644 --- a/SpiceQL/src/utils.cpp +++ b/SpiceQL/src/utils.cpp @@ -98,7 +98,7 @@ namespace SpiceQL { transform(s.begin(), s.end(), s.begin(), [](unsigned char c){ return tolower(c); }); return s; } - + string replaceAll(string str, const string& from, const string& to) { size_t start_pos = 0; @@ -209,17 +209,13 @@ namespace SpiceQL { } json ephemKernels = {}; - json baseKernels = {}; if (searchKernels) { - ephemKernels = Inventory::search_for_kernelset(mission, {"sclk", "ck", "spk", "pck", "tspk", "fk"}, ets.front(), ets.back(), ckQuality, spkQuality); - baseKernels = Inventory::search_for_kernelset("base", {"lsk", "pck", "spk"}); - SPDLOG_DEBUG("Base Kernels : {}", baseKernels.dump(4)); + ephemKernels = Inventory::search_for_kernelsets({mission, observer, "base"}, {"sclk", "ck", "spk", "pck", "tspk", "fk", "lsk", "fk"}, ets.front(), ets.back(), ckQuality, spkQuality); SPDLOG_DEBUG("{} Kernels : {}", mission, ephemKernels.dump(4)); } auto start = high_resolution_clock::now(); - KernelSet baseSet(baseKernels); KernelSet ephemSet(ephemKernels); auto stop = high_resolution_clock::now(); @@ -456,19 +452,13 @@ namespace SpiceQL { } json ephemKernels = {}; - json lskKernels = {}; - json pckKernels = {}; if (searchKernels) { - ephemKernels = Inventory::search_for_kernelset(mission, {"sclk", "ck", "pck", "fk", "tspk"}, ets.front(), ets.back(), ckQuality, "noquality"); - lskKernels = Inventory::search_for_kernelset("base", {"lsk"}); - pckKernels = Inventory::search_for_kernelset("base", {"pck"}); + ephemKernels = Inventory::search_for_kernelsets({mission, "base"}, {"sclk", "ck", "pck", "fk", "tspk", "lsk", "tspk"}, ets.front(), ets.back(), ckQuality, "noquality"); } auto start = high_resolution_clock::now(); KernelSet ephemSet(ephemKernels); - KernelSet lskSet(lskKernels); - KernelSet pckSet(pckKernels); auto stop = high_resolution_clock::now(); auto duration = duration_cast(stop - start); SPDLOG_INFO("Time in microseconds to furnish kernel sets: {}", duration.count()); @@ -952,7 +942,7 @@ namespace SpiceQL { //this resizing is done because otherwise a spice cell will append new data //to the last "currCell" ssize_c(0, &currCell); - ssize_c(100, &currCell); + ssize_c(200000, &currCell); SPICEDOUBLE_CELL(cover, 200000); @@ -1050,14 +1040,14 @@ namespace SpiceQL { string currFile = fileType; //create a spice cell capable of containing all the objects in the kernel. - SPICEINT_CELL(currCell, 200000); + SPICEINT_CELL(currCell, 300000); //this resizing is done because otherwise a spice cell will append new data //to the last "currCell" ssize_c(0, &currCell); - ssize_c(200000, &currCell); + ssize_c(300000, &currCell); - SPICEDOUBLE_CELL(cover, 200000); + SPICEDOUBLE_CELL(cover, 300000); if (currFile == "SPK") { spkobj_c(kpath.c_str(), &currCell); @@ -1083,17 +1073,17 @@ namespace SpiceQL { if (body < 0) { //find the correct coverage window if(currFile == "SPK") { - SPICEDOUBLE_CELL(cover, 200000); + SPICEDOUBLE_CELL(cover, 300000); ssize_c(0, &cover); - ssize_c(200000, &cover); + ssize_c(300000, &cover); spkcov_c(kpath.c_str(), body, &cover); getStartStopFromInterval(cover); } else if(currFile == "CK") { // 200,000 is the max coverage window size for a CK kernel - SPICEDOUBLE_CELL(cover, 200000); + SPICEDOUBLE_CELL(cover, 300000); ssize_c(0, &cover); - ssize_c(200000, &cover); + ssize_c(300000, &cover); // A SPICE SEGMENT is composed of SPICE INTERVALS ckcov_c(kpath.c_str(), body, SPICEFALSE, "INTERVAL", 0.0, "TDB", &cover); diff --git a/SpiceQL/tests/CMakeLists.txt b/SpiceQL/tests/CMakeLists.txt index 715e182..a4d3624 100644 --- a/SpiceQL/tests/CMakeLists.txt +++ b/SpiceQL/tests/CMakeLists.txt @@ -20,7 +20,6 @@ set (SPICEQL_TEST_SOURCE ${SPICEQL_TEST_DIRECTORY}/TestUtilities.cpp ${SPICEQL_TEST_DIRECTORY}/KernelTests.cpp ${SPICEQL_TEST_DIRECTORY}/MemoTests.cpp ${SPICEQL_TEST_DIRECTORY}/InventoryTests.cpp - ${SPICEQL_TEST_DIRECTORY}/FunctionalTestsSpiceQueries.cpp ${SPICEQL_TEST_DIRECTORY}/FunctionalTestsConfig.cpp) # setup test executable diff --git a/SpiceQL/tests/Fixtures.cpp b/SpiceQL/tests/Fixtures.cpp index 7763e93..432747c 100644 --- a/SpiceQL/tests/Fixtures.cpp +++ b/SpiceQL/tests/Fixtures.cpp @@ -219,10 +219,14 @@ void LroKernelSet::SetUp() { // TODO: Programmatic clock kernels lskPath = fs::path("data") / "naif0012.tls"; sclkPath = fs::path("data") / "lro_clkcor_2020184_v00.tsc"; + tspkPath = fs::path("data") / "moon_pa_de421_1900-2050.bpc"; + create_directory(root / "clocks"); + create_directory(root / "tspk"); fs::copy_file(lskPath, root / "clocks" / "naif0012.tls"); fs::copy_file(sclkPath, root / "clocks" / "lro_clkcor_2020184_v00.tsc"); + fs::copy_file(tspkPath, root / "tspk" / "moon_pa_de421_1900-2050.bpc"); // reassign member vars to temp dir lskPath = root / "clocks" / "naif0012.tls"; @@ -300,6 +304,7 @@ void LroKernelSet::SetUp() { // Write FK --------------------------------------------- fs::create_directory(root / "fk"); + fs::create_directory(root / "pck"); jKeywords = { {"FRAME_LRO_LROCWAC", -85620}, @@ -322,8 +327,13 @@ void LroKernelSet::SetUp() { }; fkPath = root / "fk" / "lro_frames_1111111_v01.tf"; + moonPckPath = root / "pck" / "moon_080317.tf"; + basePckPath = root / "pck" / "pck00009.tpc"; + // contents doesn't matter rn writeTextKernel(fkPath, "fk", jKeywords); + writeTextKernel(moonPckPath, "fk", jKeywords); + writeTextKernel(basePckPath, "fk", jKeywords); conf = R"({ "moc" : { diff --git a/SpiceQL/tests/Fixtures.h b/SpiceQL/tests/Fixtures.h index 2c8ac1d..308a50b 100644 --- a/SpiceQL/tests/Fixtures.h +++ b/SpiceQL/tests/Fixtures.h @@ -51,6 +51,7 @@ class LroKernelSet : public ::testing::Test { fs::path root; string lskPath; string sclkPath; + string tspkPath; string ckPath1; string ckPath2; string spkPath1; @@ -59,6 +60,8 @@ class LroKernelSet : public ::testing::Test { string ikPath1; string ikPath2; string fkPath; + string moonPckPath; + string basePckPath; nlohmann::json conf; diff --git a/SpiceQL/tests/FunctionalTestsConfig.cpp b/SpiceQL/tests/FunctionalTestsConfig.cpp index b3e69e6..b22d42b 100644 --- a/SpiceQL/tests/FunctionalTestsConfig.cpp +++ b/SpiceQL/tests/FunctionalTestsConfig.cpp @@ -184,28 +184,29 @@ TEST_F(TestConfig, FunctionalTestsSubConfigGetLatestRecursive) { TEST_F(TestConfig, FunctionalTestsConfigGet) { - vector expectedPointers = {"/ck/reconstructed", "/fk", "/iak", "/ik", "/pck", "/spk/reconstructed", "/spk/smithed", "/sclk", "/tspk"}; + vector expectedPointers = {"/ck/reconstructed", "/fk", "/iak", "/ik", "/spk/reconstructed", "/spk/smithed", "/sclk"}; MockRepository mocks; mocks.OnCallFunc(Memo::ls).Return(paths); json resJson = testConfig.get("lroc"); - EXPECT_EQ(resJson.size(), 8); + EXPECT_EQ(resJson.size(), 6); for (auto pointer : expectedPointers) { - ASSERT_TRUE(resJson.contains(json::json_pointer(pointer))); + SPDLOG_DEBUG("Checking for {}", pointer); + EXPECT_TRUE(resJson.contains(json::json_pointer(pointer))); EXPECT_TRUE(resJson[json::json_pointer(pointer)]["kernels"].size() > 0); } } TEST_F(TestConfig, FunctionalTestsConfigGetVector) { - vector expectedLrocPointers = {"/ck/reconstructed", "/fk", "/iak", "/ik", "/pck", "/spk/reconstructed", "/spk/smithed", "/sclk", "/tspk"}; - vector expectedCassiniPointers = {"/ck/reconstructed", "/ck/smithed", "/fk", "/iak", "/pck", "/pck/smithed", "/sclk", "/spk"}; + vector expectedLrocPointers = {"/ck/reconstructed", "/fk", "/iak", "/ik", "/spk/reconstructed", "/spk/smithed", "/sclk"}; + vector expectedCassiniPointers = {"/ck/reconstructed", "/ck/smithed", "/fk", "/iak", "/pck/smithed", "/sclk", "/spk"}; MockRepository mocks; mocks.OnCallFunc(Memo::ls).Return(paths); vector configPointers = {"lroc", "cassini"}; json resJson = testConfig.get(configPointers); ASSERT_EQ(resJson.size(), 2); - ASSERT_EQ(resJson["lroc"].size(), 8); + ASSERT_EQ(resJson["lroc"].size(), 6); for (auto pointer : expectedLrocPointers) { ASSERT_TRUE(resJson["lroc"].contains(json::json_pointer(pointer))); EXPECT_TRUE(resJson["lroc"][json::json_pointer(pointer)]["kernels"].size() > 0); @@ -219,13 +220,13 @@ TEST_F(TestConfig, FunctionalTestsConfigGetVector) { } TEST_F(TestConfig, FunctionalTestsSubsetConfigGetVector) { - vector expectedPointers = {"/fk", "/sclk", "/ik", "/pck"}; + vector expectedPointers = {"/fk", "/sclk", "/ik"}; MockRepository mocks; mocks.OnCallFunc(Memo::ls).Return(paths); testConfig = testConfig["lroc"]; json resJson = testConfig.get(expectedPointers); - ASSERT_EQ(resJson.size(), 4); + ASSERT_EQ(resJson.size(), 3); for (auto pointer : expectedPointers) { ASSERT_TRUE(resJson.contains(json::json_pointer(pointer))); EXPECT_TRUE(resJson[json::json_pointer(pointer)]["kernels"].size() > 0); diff --git a/SpiceQL/tests/FunctionalTestsSpiceQueries.cpp b/SpiceQL/tests/FunctionalTestsSpiceQueries.cpp index f5cae1a..a0921f6 100644 --- a/SpiceQL/tests/FunctionalTestsSpiceQueries.cpp +++ b/SpiceQL/tests/FunctionalTestsSpiceQueries.cpp @@ -1,5 +1,6 @@ #include #include +#include #include @@ -13,13 +14,3 @@ using namespace std; using namespace SpiceQL; -TEST_F(LroKernelSet, FunctionalTestSearchMissionKernels) { - // do a time query - nlohmann::json kernels = Inventory::search_for_kernelset("lroc", {"lsk", "sclk", "ck", "spk", "iak", "fk"}, 110000000, 140000001); - cout << kernels.dump(4) << endl; - ASSERT_EQ(kernels["ck"].size(), 2); - EXPECT_EQ(fs::path(kernels["ck"][0].get()).filename(), "soc31_1111111_1111111_v21.bc" ); - EXPECT_EQ(fs::path(kernels["iak"][0].get()).filename(), "lro_instrumentAddendum_v11.ti"); - EXPECT_EQ(fs::path(kernels["fk"][0].get()).filename(), "lro_frames_1111111_v01.tf"); - EXPECT_EQ(fs::path(kernels["sclk"][0].get()).filename(), "lro_clkcor_2020184_v00.tsc"); -} \ No newline at end of file diff --git a/SpiceQL/tests/InventoryTests.cpp b/SpiceQL/tests/InventoryTests.cpp index b480126..494f0ac 100644 --- a/SpiceQL/tests/InventoryTests.cpp +++ b/SpiceQL/tests/InventoryTests.cpp @@ -20,8 +20,8 @@ TEST_F(LroKernelSet, TestInventorySmithed) { EXPECT_EQ(kernels["spk"].size(), 3); - EXPECT_EQ(kernels["ckQuality"], "reconstructed"); - EXPECT_EQ(kernels["spkQuality"], "smithed"); + EXPECT_EQ(kernels["lroc_ck_quality"], "reconstructed"); + EXPECT_EQ(kernels["lroc_spk_quality"], "smithed"); } TEST_F(LroKernelSet, TestInventoryRecon) { @@ -31,7 +31,7 @@ TEST_F(LroKernelSet, TestInventoryRecon) { EXPECT_EQ(fs::path(kernels["sclk"][0]).filename(), "lro_clkcor_2020184_v00.tsc"); EXPECT_TRUE(!kernels.contains("spk")); // no spks EXPECT_EQ(fs::path(kernels["ck"][0]).filename(), "soc31_1111111_1111111_v21.bc"); - EXPECT_EQ(kernels["ckQuality"], "reconstructed"); + EXPECT_EQ(kernels["lroc_ck_quality"], "reconstructed"); } @@ -73,7 +73,7 @@ TEST_F(LroKernelSet, TestInventoryPortability) { TEST_F(KernelsWithQualities, TestUnenforcedQuality) { nlohmann::json kernels = Inventory::search_for_kernelset("odyssey", {"spk"}, 130000000, 140000000, "smithed", "smithed", false); // smithed kernels should not exist so it should return reconstructed - EXPECT_EQ(kernels["spkQuality"].get(), "reconstructed"); + EXPECT_EQ(kernels["odyssey_spk_quality"].get(), "reconstructed"); } @@ -83,3 +83,30 @@ TEST_F(KernelsWithQualities, TestEnforcedQuality) { EXPECT_TRUE(kernels.is_null()); } +TEST_F(LroKernelSet, TestInventorySearch) { + // do a time query + nlohmann::json kernels = Inventory::search_for_kernelset("lroc", {"lsk", "sclk", "ck", "spk", "iak", "fk"}, 110000000, 140000001); + SPDLOG_DEBUG("TEST KERNELS: {}", kernels.dump(4)); + EXPECT_EQ(kernels["ck"].size(), 2); + EXPECT_EQ(fs::path(kernels["ck"][0].get()).filename(), "soc31_1111111_1111111_v21.bc" ); + EXPECT_EQ(fs::path(kernels["iak"][0].get()).filename(), "lro_instrumentAddendum_v11.ti"); + EXPECT_EQ(fs::path(kernels["fk"][0].get()).filename(), "lro_frames_1111111_v01.tf"); + EXPECT_EQ(fs::path(kernels["sclk"][0].get()).filename(), "lro_clkcor_2020184_v00.tsc"); +} + +TEST_F(LroKernelSet, TestInventorySearchSetsNoOverwrite) { + // do a time query + nlohmann::json kernels = Inventory::search_for_kernelsets({"moon", "base"}, {"pck"}, 110000000, 140000001, "reconstructed", "reconstructed", false, false); + SPDLOG_DEBUG("TEST KERNELS: {}", kernels.dump(4)); + EXPECT_EQ(kernels["pck"].size(), 2); + EXPECT_EQ(fs::path(kernels["pck"][0].get()).filename(), "moon_080317.tf"); + EXPECT_EQ(fs::path(kernels["pck"][1].get()).filename(), "pck00009.tpc"); +} + +TEST_F(LroKernelSet, TestInventorySearchSetsOverwrite) { + // do a time query + nlohmann::json kernels = Inventory::search_for_kernelsets({"moon", "base"}, {"pck"}, 110000000, 140000001, "reconstructed", "reconstructed", false, true); + SPDLOG_DEBUG("TEST KERNELS: {}", kernels.dump(4)); + EXPECT_EQ(kernels["pck"].size(), 1); + EXPECT_EQ(fs::path(kernels["pck"][0].get()).filename(), "pck00009.tpc"); +} diff --git a/SpiceQL/tests/QueryTests.cpp b/SpiceQL/tests/QueryTests.cpp index 421a185..ca90e17 100644 --- a/SpiceQL/tests/QueryTests.cpp +++ b/SpiceQL/tests/QueryTests.cpp @@ -117,7 +117,7 @@ TEST_F(KernelDataDirectories, FunctionalTestListMissionKernelsAllMess) { EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["ck"]["reconstructed"]["kernels"]).size(), 4); EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["ck"]["smithed"]["kernels"]).size(), 4); EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["spk"]["reconstructed"]["kernels"]).size(), 2); - EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["tspk"]["kernels"]).size(), 1); + EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["tspk"]["kernels"]).size(), 0); EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["fk"]["kernels"]).size(), 2); EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["ik"]["kernels"]).size(), 2); EXPECT_EQ(SpiceQL::getKernelsAsVector(res["mdis"]["iak"]["kernels"]).size(), 2); @@ -172,7 +172,7 @@ TEST_F(KernelDataDirectories, FunctionalTestListMissionKernelsGalileo) { ASSERT_EQ(SpiceQL::getKernelsAsVector(res["galileo"]["spk"]["reconstructed"]["kernels"]).size(), 2); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["galileo"]["iak"]["kernels"]).size(), 1); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["galileo"]["pck"]["smithed"]["kernels"]).size(), 2); - ASSERT_EQ(SpiceQL::getKernelsAsVector(res["galileo"]["pck"]["noquality"]["kernels"]).size(), 1); + ASSERT_EQ(SpiceQL::getKernelsAsVector(res["galileo"]["pck"]["noquality"]["kernels"]).size(), 0); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["galileo"]["sclk"]["kernels"]).size(), 1); } @@ -192,7 +192,7 @@ TEST_F(KernelDataDirectories, FunctionalTestListMissionKernelsCassini) { ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["ck"]["smithed"]["kernels"]).size(), 2); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["fk"]["kernels"]).size(), 2); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["iak"]["kernels"]).size(), 3); - ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["pck"]["kernels"]).size(), 3); + ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["pck"]["kernels"]).size(), 0); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["pck"]["smithed"]["kernels"]).size(), 1); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["sclk"]["kernels"]).size(), 1); ASSERT_EQ(SpiceQL::getKernelsAsVector(res["cassini"]["spk"]["kernels"]).size(), 3); @@ -245,7 +245,7 @@ TEST_F(IsisDataDirectory, FunctionalTestLroConf) { SPDLOG_DEBUG("Checking Recon SPKs"); kernelToCheck = getKernelsAsVector(res.at("moc").at("spk").at("reconstructed")); - expected = {"fdf29r_2018305_2018335_v01.bsp", "fdf29_2021327_2021328_b01.bsp"}; + expected = {"fdf29r_2018305_2018335_v01.bsp"}; for (auto &e : expected) { auto it = find(kernelToCheck.begin(), kernelToCheck.end(), e); if (it == kernelToCheck.end()) { @@ -274,6 +274,9 @@ TEST_F(IsisDataDirectory, FunctionalTestJunoConf) { set expectedDiff = {"jup260.bsp", "jup310.bsp", "jup329.bsp", + "de436s.bsp", + "de438s.bsp", + "de440s.bsp", "vgr1_jup230.bsp", "vgr2_jup204.bsp", "vgr2_jup230.bsp"}; diff --git a/SpiceQL/tests/data/isisKernelList.txt b/SpiceQL/tests/data/isisKernelList.txt index 614e5c0..77aef5b 100644 --- a/SpiceQL/tests/data/isisKernelList.txt +++ b/SpiceQL/tests/data/isisKernelList.txt @@ -9659,8 +9659,6 @@ /home/ec2-user/efs_prod/isis_data/juno/kernels/fk/juno_v11.tf /home/ec2-user/efs_prod/isis_data/kaguya/kernels/ck/SEL_M_ALL_D_V02.BC /home/ec2-user/efs_prod/isis_data/kaguya/kernels/sclk/SEL_M_V01.TSC -/home/ec2-user/efs_prod/isis_data/kaguya/kernels/pck/moon_assoc_me.tf -/home/ec2-user/efs_prod/isis_data/kaguya/kernels/pck/moon_080317.tf /home/ec2-user/efs_prod/isis_data/kaguya/kernels/ik/SEL_MI_V01.TI /home/ec2-user/efs_prod/isis_data/kaguya/kernels/ik/SEL_TC_V01.TI /home/ec2-user/efs_prod/isis_data/kaguya/kernels/iak/kaguyaTcAddendum001.ti @@ -9674,7 +9672,6 @@ /home/ec2-user/efs_prod/isis_data/kaguya/kernels/spk/SEL_M_071020_081226_SGMI_05.BSP /home/ec2-user/efs_prod/isis_data/kaguya/kernels/spk/SELMAINGRGM900CL660DIRALT2008103020090610.bsp /home/ec2-user/efs_prod/isis_data/kaguya/kernels/spk/SEL_M_071020_090610_SGMH_02.BSP -/home/ec2-user/efs_prod/isis_data/kaguya/kernels/tspk/de421.bsp /home/ec2-user/efs_prod/isis_data/kaguya/kernels/fk/SEL_V01.TF /home/ec2-user/efs_prod/isis_data/galileo/kernels/ck/ck92345a_plt.bc /home/ec2-user/efs_prod/isis_data/galileo/kernels/ck/ck90342b_plt.bc @@ -12198,8 +12195,6 @@ /home/ec2-user/efs_prod/isis_data/lro/kernels/sclk/lro_clkcor_2021293_v00.tsc /home/ec2-user/efs_prod/isis_data/lro/kernels/sclk/lro_clkcor_2021327_v00.tsc /home/ec2-user/efs_prod/isis_data/lro/kernels/sclk/lro_clkcor_2021287_v00.tsc -/home/ec2-user/efs_prod/isis_data/lro/kernels/pck/moon_assoc_me.tf -/home/ec2-user/efs_prod/isis_data/lro/kernels/pck/moon_080317.tf /home/ec2-user/efs_prod/isis_data/lro/kernels/ik/lro_lroc_v13.ti /home/ec2-user/efs_prod/isis_data/lro/kernels/ik/lro_lroc_v15.ti /home/ec2-user/efs_prod/isis_data/lro/kernels/ik/lro_lroc_v16.ti @@ -12479,7 +12474,6 @@ /home/ec2-user/efs_prod/isis_data/lro/kernels/spk/fdf29_2021327_2021328_b01.bsp /home/ec2-user/efs_prod/isis_data/lro/kernels/spk/LRO_ES_05_201308_GRGM660PRIMAT270.bsp /home/ec2-user/efs_prod/isis_data/lro/kernels/spk/fdf29r_2014335_2015001_v01.bsp -/home/ec2-user/efs_prod/isis_data/lro/kernels/tspk/de421.bsp /home/ec2-user/efs_prod/isis_data/lro/kernels/fk/lro_frames_2009322_v01.tf /home/ec2-user/efs_prod/isis_data/lro/kernels/fk/lro_frames_2010277_v01.tf /home/ec2-user/efs_prod/isis_data/lro/kernels/fk/lro_frames_2009171_v01.tf @@ -14277,7 +14271,6 @@ /home/ec2-user/efs_prod/isis_data/msl/kernels/ik/msl_nrb_20130530_c05.ti /home/ec2-user/efs_prod/isis_data/msl/kernels/ik/msl_struct_v01.ti /home/ec2-user/efs_prod/isis_data/msl/kernels/lsk/msl.tls -/home/ec2-user/efs_prod/isis_data/msl/kernels/lsk/msl.tls.history /home/ec2-user/efs_prod/isis_data/msl/kernels/sclk/MSL_76_SCLKSCET.00002.tsc /home/ec2-user/efs_prod/isis_data/msl/kernels/sclk/MSL_76_SCLKSCET.00007.tsc /home/ec2-user/efs_prod/isis_data/msl/kernels/sclk/MSL_76_SCLKSCET.00009.tsc diff --git a/SpiceQL/tests/data/moon_pa_de421_1900-2050.bpc b/SpiceQL/tests/data/moon_pa_de421_1900-2050.bpc new file mode 100755 index 0000000..10e35ab Binary files /dev/null and b/SpiceQL/tests/data/moon_pa_de421_1900-2050.bpc differ