Skip to content

Commit

Permalink
Fix download problem (#291)
Browse files Browse the repository at this point in the history
* Fix paths to spectral model files in temperature response

The path to the model for hybrid abundances and photospheric abundances were switched.

* Fix atol in test_temperature_response_coronal.py

Made atol scaled to temperature response to provide a more stringent test.

* Fix atol in test_temperature_response_hybrid.py

Made atol scaled to temperature response to provide a more stringent test.

* Fix atol in test_temperature_response_photospheric.py

Made atol scaled to temperature response to provide a more stringent test.

* Fix atol in test_temperature_response.py

Made atol scaled to temperature response to provide a more stringent test.

* Fix atol, rtol values in test_temperature_response.py

Use atol and rtol values that should lead to passing all tests.

* Fix atol, rtol values in test_temperature_response_coronal.py

Use atol, rtol values that should lead to passing all tests.

* Fix atol, rtol values in test_temperature_response_hybrid.py

Use atol, rtol values that should lead to passing all tests.

* Fix atol, rtol values in test_temperature_response_photospheric.py

Use atol, rtol values that should lead to passing all tests.

* Another fix to test_temperature_response_hybrid.py

needed to scale atol to max value of temperature response

* Another fix to test_temperature_response_coronal.py

need to scale atol to the max value of temperature response

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Created new directory, image_correction, and moved xrt_remove_lightleak and xrt_deconvolve to that directory. Also moved associated tests and data

* small changes to image_correction/__init__.py

* Changed from print statements to logger in temperature_from_filter_ratio. Also added fits keywords HGLN_OBS and HGLT_OBS to returned map metadata.

* Update make_exposure_map.py

added allow_insecure=True to calls to download_file

* Update Temperature_using_composites.ipynb

added allow_insecure=True to calls to download_file in Temperature_using_composites notebook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jslavin and pre-commit-ci[bot] authored Sep 5, 2024
1 parent 5cd98bf commit 7efbf81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
"url1 = filename2repo_path(filename1, join=True)\n",
"url2 = filename2repo_path(filename2, join=True)\n",
"# These files will go under your astropy cache directory, typically ~/.astropy/cache/download/url/\n",
"file1 = download_file(url1)\n",
"file2 = download_file(url2)"
"file1 = download_file(url1, allow_insecure=True)\n",
"file2 = download_file(url2, allow_insecure=True)"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions xrtpy/util/make_exposure_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def make_exposure_map(comp_image_file, qualfiles=None, retsatpix=False, verbose=
)
medium_exp_urlpath = filename2repo_path(medium_exp_qualpath, join=True)
logging.info(f"medium exp. url: {medium_exp_urlpath}")
medium_exp_qualpath = download_file(medium_exp_urlpath)
medium_exp_qualpath = download_file(medium_exp_urlpath, allow_insecure=True)
else:
medium_exp_qualpath = Path(qualfiles[0])
else:
Expand All @@ -87,7 +87,7 @@ def make_exposure_map(comp_image_file, qualfiles=None, retsatpix=False, verbose=
long_exp_filename.stem + ".qual" + long_exp_filename.suffix
)
long_exp_urlpath = filename2repo_path(long_exp_qualpath, join=True)
long_exp_qualpath = download_file(long_exp_urlpath)
long_exp_qualpath = download_file(long_exp_urlpath, allow_insecure=True)
else:
if triple:
long_exp_qualpath = Path(qualfiles[1])
Expand Down

0 comments on commit 7efbf81

Please sign in to comment.