Skip to content

Avoid implicit changes to ict and space counts in thermal calibration #77

@carloshorn

Description

@carloshorn

To avoid an implicit change of the input arrays, I would move the interpolation of missing/wrong data in the ICT and space counts to the POD/KLM specific reader method get_telemetry or use a copy instead of changing the input in-place.

pygac/pygac/calibration.py

Lines 409 to 425 in 8a7f11e

# Thresholds to flag missing/wrong data for interpolation
ict_threshold = 100
space_threshold = 100
if channel == 3:
zeros = ict < ict_threshold
nonzeros = np.logical_not(zeros)
ict[zeros] = np.interp((zeros).nonzero()[0],
(nonzeros).nonzero()[0],
ict[nonzeros])
zeros = space < space_threshold
nonzeros = np.logical_not(zeros)
space[zeros] = np.interp((zeros).nonzero()[0],
(nonzeros).nonzero()[0],
space[nonzeros])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions