Skip to content

Commit 8a62ad1

Browse files
authored
Merge pull request #1291 from cta-observatory/replace_test_file
Replace test file
2 parents 95f7227 + c025849 commit 8a62ad1

10 files changed

+22
-13
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ __pycache__
2020
*/cython_version.py
2121
htmlcov
2222
.coverage
23+
.coverage.*
24+
coverage.xml
2325
MANIFEST
2426

2527
# Sphinx

lstchain/reco/r0_to_dl1.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,11 +329,10 @@ def r0_to_dl1(
329329
-------
330330
331331
"""
332-
333332
# using None as default and using `get_dataset_path` only inside the function
334333
# prevents downloading at import time.
335334
if input_filename is None:
336-
get_dataset_path('gamma_test_large.simtel.gz')
335+
get_dataset_path('gamma_lstprod2.simtel.gz')
337336

338337
if output_filename is None:
339338
try:

lstchain/scripts/lstchain_mc_r0_to_dl1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def main():
5252
args = parser.parse_args()
5353

5454
# using a default of None and only using get_dataset_path here
55-
# prevents downloading gamma_test_large when an input file is actually given
55+
# prevents downloading when an input file is actually given
5656
# or just --help is called.
5757
if args.input_file is None:
58-
args.input_file = get_dataset_path('gamma_test_large.simtel.gz')
58+
args.input_file = get_dataset_path('gamma_lstprod2.simtel.gz')
5959

6060
output_dir = args.output_dir.absolute()
6161
output_dir.mkdir(exist_ok=True, parents=True)

lstchain/scripts/lstchain_mc_r0_to_dl2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ def main():
6262
args = parser.parse_args()
6363

6464
# using a default of None and only using get_dataset_path here
65-
# prevents downloading gamma_test_large when an input file is actually given
65+
# prevents downloading when an input file is actually given
6666
# or just --help is called.
6767
if args.datafile is None:
68-
args.datafile = get_dataset_path('gamma_test_large.simtel.gz')
68+
args.datafile = get_dataset_path('gamma_lstprod2.simtel.gz')
6969

7070
output_dir = args.output_dir.absolute()
7171
dl1_file = output_dir / r0_to_dl1_filename(args.datafile.name)

lstchain/scripts/tests/test_lstchain_scripts.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ def merged_simulated_dl1_file(simulated_dl1_file, temp_dir_simulated_files):
9090
return merged_dl1_file
9191

9292

93+
def test_lstchain_mc_r0_to_dl1_default_mc_file(tmp_path):
94+
"""Run R0 to DL1 script for the default MC file without specifying an input file."""
95+
output_file = tmp_path / "dl1_gamma_lstprod2.h5"
96+
run_program("lstchain_mc_r0_to_dl1", "-o", tmp_path)
97+
assert output_file.is_file()
98+
99+
93100
def test_lstchain_mc_r0_to_dl1(simulated_dl1_file):
94101
assert simulated_dl1_file.is_file()
95102

notebooks/disp.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"outputs": [],
7171
"source": [
72-
"infile = get_dataset_path(\"gamma_test_large.simtel.gz\")\n",
72+
"infile = get_dataset_path(\"gamma_lstprod2.simtel.gz\")\n",
7373
"\n",
7474
"allowed_tels = {1} # select LST1 only\n",
7575
"max_events = (\n",

notebooks/example_container.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
},
4848
"outputs": [],
4949
"source": [
50-
"infile = get_dataset_path(\"gamma_test_large.simtel.gz\")\n",
50+
"infile = get_dataset_path(\"gamma_lstprod2.simtel.gz\")\n",
5151
"\n",
5252
"dl1_parameters_filename = \"dl1.h5\"\n",
5353
"\n",

notebooks/lstchain.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@
7979
},
8080
"outputs": [],
8181
"source": [
82-
"#datafile = get_dataset_path('gamma_test_large.simtel.gz')\n",
82+
"# test data file from the ctapipe data server\n",
83+
"datafile = get_dataset_path('gamma_lstprod2.simtel.gz')\n",
8384
"\n",
84-
"# Local files can be also imported.\n",
85-
"datafile = \"/fefs/aswg/data/mc/DL0/20190415/gamma/south_pointing/gamma_20deg_180deg_run9___cta-prod3-demo-2147m-LaPalma-baseline-mono_off0.4.simtel.gz\""
85+
"# Local files can be also be used:\n",
86+
"# datafile = \"/fefs/aswg/data/mc/DL0/20190415/gamma/south_pointing/gamma_20deg_180deg_run9___cta-prod3-demo-2147m-LaPalma-baseline-mono_off0.4.simtel.gz\""
8687
]
8788
},
8889
{

notebooks/mc_energy_distr.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"metadata": {},
2828
"outputs": [],
2929
"source": [
30-
"simtel_file = get_dataset_path('gamma_test_large.simtel.gz')"
30+
"simtel_file = get_dataset_path('gamma_lstprod2.simtel.gz')"
3131
]
3232
},
3333
{

notebooks/step_by_step_dl0_to_dl1.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"metadata": {},
8383
"outputs": [],
8484
"source": [
85-
"#input_filename=get_dataset_path('gamma_test_large.simtel.gz')\n",
85+
"#input_filename=get_dataset_path('gamma_prod2.simtel.gz')\n",
8686
"input_filename=\"/home/queenmab/DATA/LST1/Gamma/gamma_20deg_0deg_run8___cta-prod3-lapalma-2147m-LaPalma-FlashCam.simtel.gz\""
8787
]
8888
},

0 commit comments

Comments
 (0)