Skip to content

Commit

Permalink
add check if data is None before NaN check to prevent errors in multi…
Browse files Browse the repository at this point in the history
… px projection
  • Loading branch information
AStcherbinine committed Aug 4, 2022
1 parent bfea8f3 commit afb84ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spip/emm_emirs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## emm_emirs.py
## Created by Aurélien STCHERBININE
## Last modified by Aurélien STCHERBININE : 11/05/2022
## Last modified by Aurélien STCHERBININE : 04/08/2022

##----------------------------------------------------------------------------------------
"""Projection of an EMM/EMIRS pixel fov on Mars.
Expand Down Expand Up @@ -168,7 +168,7 @@ def emirs_ifov_multi_px_projection(lon_grid, lat_grid, lon, lat, data, emer,
emer_i, d_Mars_sc_i = emer[i], d_Mars_sc[i]
ignore = (
np.isnan(longi) or np.isnan(lati) # Test coords
or np.isnan(datai) # Test values
or (datai is None) or np.isnan(datai) # Test values
or (not negative_values and (datai < 0)) # Ignore negative values if specified
or (not zero_values and (datai == 0)) # Ignore null values if specified
)
Expand Down

0 comments on commit afb84ac

Please sign in to comment.