-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed geoloc_example and added variable descriptions #121
Conversation
pyorbital/geoloc_example.py
Outdated
times = (np.tile(scan_points * 0.000025 + 0.0025415, [scanline_nb, 1]) | ||
+ np.expand_dims(offset, 1)) | ||
times = np.tile(scan_points * int_t, [np.int32(scans_nb), 1]) | ||
offset = np.arange(np.int32(scans_nb)) * scan_p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to cast the scans_nb to int32?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is based on "geoloc_instrument_definitions.py" line 65. I'm not very experienced with this package and just tried to copy the format of what is done in that file, since that worked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I understand. But I think just in the example, the casting is probably not needed. Would you mind trying without and see if the results look correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it and results were identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks a lot! then I guess this is good to go :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if we remove the integer casting
pyorbital/geoloc_example.py
Outdated
times = (np.tile(scan_points * 0.000025 + 0.0025415, [scanline_nb, 1]) | ||
+ np.expand_dims(offset, 1)) | ||
times = np.tile(scan_points * int_t, [np.int32(scans_nb), 1]) | ||
offset = np.arange(np.int32(scans_nb)) * scan_p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
offset = np.arange(np.int32(scans_nb)) * scan_p | |
offset = np.arange(scans_nb) * scan_p |
pyorbital/geoloc_example.py
Outdated
offset = np.arange(scanline_nb) * 0.1666667 | ||
times = (np.tile(scan_points * 0.000025 + 0.0025415, [scanline_nb, 1]) | ||
+ np.expand_dims(offset, 1)) | ||
times = np.tile(scan_points * int_t, [np.int32(scans_nb), 1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
times = np.tile(scan_points * int_t, [np.int32(scans_nb), 1]) | |
times = np.tile(scan_points * int_t, [scans_nb, 1]) |
pyorbital/geoloc_example.py
Outdated
avhrr = np.vstack(((scan_points / 1023.5-1) * np.deg2rad(-scan_angle), | ||
np.zeros((len(scan_points),)))) | ||
avhrr = np.tile( | ||
avhrr[:, np.newaxis, :], [1, np.int32(scans_nb), 1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avhrr[:, np.newaxis, :], [1, np.int32(scans_nb), 1]) | |
avhrr[:, np.newaxis, :], [1, scans_nb, 1]) |
Codecov Report
@@ Coverage Diff @@
## main #121 +/- ##
==========================================
- Coverage 87.65% 87.49% -0.16%
==========================================
Files 15 15
Lines 2203 2207 +4
==========================================
Hits 1931 1931
- Misses 272 276 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Geoloc_example was no longer working. This was also mentioned in Issue #105. The example is now structured like in the instrument definitions, along with some extra comments to explain the meaning/origin of the variables used.
flake8 pyorbital