Closed scottstanie closed 1 year ago
Sorry I was wrong about the .az_line
not being defined.
Currently trying to get a reproducible example, since the bug seems not appear when I try to find which file it errored on 😕
Closing because I can't find any way to reproduce, and the logic for checking the IPF version seems to imply this bug shouldn't have happened... Sorry for the github noise (pun intended)
@scottstanie Interesting. Please re-open this issue when you are able to reproduce the error you reported here.
The member az_line
is defined in the dataclass NoiseAnnotation
, which will be assigned None
when the IPF version of the data is older than the threshold min_ipf_version_az_noise_vector
What I can think about the error is that the reader failed to parse az_line
for some reason, even when the IPF version says the information should exist in the noise annotation, and the following codes assumes that we have some data in az_line
. But I will need to some example data to figure out what exactly happened.
I got this error
Note that
id_top = np.argmin(np.abs(noise_annotation.az_line-line_from))
uses.az_line
. This is not defined anywhere: https://github.com/opera-adt/s1-reader/blob/ed16185338c879b59518ca26936751a1baffd621/src/s1reader/s1_annotation.py#L776-L789 it's probably a typo from copying this different class: https://github.com/opera-adt/s1-reader/blob/ed16185338c879b59518ca26936751a1baffd621/src/s1reader/s1_annotation.py#L274-L289Let's add some unit test that runs to make a
BurstNoise
class, I think this would currently fail for any whereipf_version >= min_ipf_version_az_noise_vector