Skip to content

Commit

Permalink
Update values for remote file
Browse files Browse the repository at this point in the history
  • Loading branch information
rosteen committed Dec 3, 2024
1 parent 3f1abf7 commit 20a2aee
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions jdaviz/configs/imviz/tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,11 +386,11 @@ def test_parse_hst_drz(self, imviz_helper):
comp = data.get_component('SCI,1')
expected_label = os.path.splitext(os.path.basename(url))[0] + '[SCI,1]'
assert data.label == expected_label
assert data.shape == (4299, 4219)
assert data.shape == (4299, 4220)
assert_allclose(data.meta['PHOTFLAM'], 7.8711728E-20)
assert isinstance(data.coords, WCS)
assert comp.units == 'electron/s'
assert comp.data.shape == (4299, 4219)
assert comp.data.shape == (4299, 4220)

# --- Since download is expensive, we attach FITS WCS-specific tests here. ---

Expand All @@ -413,29 +413,29 @@ def test_parse_hst_drz(self, imviz_helper):
assert_allclose(sky.dec.deg, 10.802045612042956, rtol=1e-3)
data_unit = u.electron / u.s
assert_quantity_allclose(tbl[0]['background'], 0.0014 * data_unit)
assert_quantity_allclose(tbl[0]['sum'], 115.944737 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['sum'], 126.636048 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['sum_aper_area'], 2583.959958 * PIX2, rtol=1e-3)
assert_array_equal(tbl[0]['pixarea_tot'], None)
assert_array_equal(tbl[0]['aperture_sum_counts'], None)
assert_array_equal(tbl[0]['aperture_sum_counts_err'], None)
assert_array_equal(tbl[0]['counts_fac'], None)
assert_array_equal(tbl[0]['aperture_sum_mag'], None)
assert_array_equal(tbl[0]['flux_scaling'], None)
assert_quantity_allclose(tbl[0]['min'], -0.042749 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['max'], 1.588676 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['mean'], 0.04495 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['median'], 0.021585 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['mode'], -0.025143 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['std'], 0.102367 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['mad_std'], 0.023415 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['var'], 0.010479 * (data_unit * data_unit), rtol=1e-3)
assert_quantity_allclose(tbl[0]['biweight_location'], 0.021173 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['biweight_midvariance'], 0.00062 * (data_unit * data_unit), rtol=1e-3) # noqa
assert_quantity_allclose(tbl[0]['fwhm'], 21.538407 * u.pix, rtol=1e-3)
assert_quantity_allclose(tbl[0]['semimajor_sigma'], 10.04406 * u.pix, rtol=1e-3)
assert_quantity_allclose(tbl[0]['semiminor_sigma'], 8.150735 * u.pix, rtol=1e-3)
assert_quantity_allclose(tbl[0]['orientation'], 79.605418 * u.deg, rtol=1e-3)
assert_quantity_allclose(tbl[0]['eccentricity'], 0.584355, rtol=1e-3)
assert_quantity_allclose(tbl[0]['min'], -0.028581 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['max'], 3.942783 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['mean'], 0.0491 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['median'], 0.021689 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['mode'], -0.033133 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['std'], 0.14436 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['mad_std'], 0.0233 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['var'], 0.02084 * (data_unit * data_unit), rtol=1e-3)
assert_quantity_allclose(tbl[0]['biweight_location'], 0.02098 * data_unit, rtol=1e-3)
assert_quantity_allclose(tbl[0]['biweight_midvariance'], 0.000622 * (data_unit * data_unit), rtol=1e-3) # noqa
assert_quantity_allclose(tbl[0]['fwhm'], 25.2262 * u.pix, rtol=1e-3)
assert_quantity_allclose(tbl[0]['semimajor_sigma'], 12.958 * u.pix, rtol=1e-3)
assert_quantity_allclose(tbl[0]['semiminor_sigma'], 7.849 * u.pix, rtol=1e-3)
assert_quantity_allclose(tbl[0]['orientation'], 88.7336 * u.deg, rtol=1e-3)
assert_quantity_allclose(tbl[0]['eccentricity'], 0.7957, rtol=1e-3)

# Request specific extension (name only), use given label
imviz_helper.load_data(filename, ext='CTX', data_label='jclj01010_drz',
Expand Down

0 comments on commit 20a2aee

Please sign in to comment.