Skip to content

Commit

Permalink
Merge pull request #121 from GreenBankObservatory/release_debug_numpy…
Browse files Browse the repository at this point in the history
…_precision

Add some printouts to debug platform-dependent precision
  • Loading branch information
mpound authored Nov 21, 2023
2 parents e84c06c + 3350f21 commit 0415780
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dysh/spectra/tests/test_scan.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import pathlib

import numpy as np
import pytest
from astropy.io import fits

import dysh
from dysh.fits import gbtfitsload


Expand Down Expand Up @@ -121,10 +118,14 @@ def test_blank_integrations(self, data_dir):
# The system temperature is different because of the squared averaging.
assert abs(ps_sb[0].calibrated(0).meta["TSYS"] - ta1[0].meta["TSYS"]) < 5e-16
assert (ps_sb[0].calibrated(0).meta["EXPOSURE"] - ta1[0].meta["EXPOSURE"]) == 0.0

arr = abs(ps_sb[0].calibrated(0).flux.value - ta1[0].flux.value) < 5e-16
print(f"test_blank_integrations: type of arr: {arr.dtype}")
print(f"test_blank_integrations: arr: {arr}")
# Check if the time averaged data matches that from the first integration.
# assert np.all(abs(ps_sb[0].calibrated(0).flux.value - ta1[0].flux.value) < 2e-19)
# Set to 5E-16 because Windows OS tests fail below that. Need to understand why.
assert np.all(abs(ps_sb[0].calibrated(0).flux.value - ta1[0].flux.value) < 5e-16)
assert np.all(arr)


class TestSubBeamNod:
Expand Down

0 comments on commit 0415780

Please sign in to comment.