Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion imap_processing/codice/codice_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,9 @@ def process_hi_sectored(dependencies: ProcessingInputCollection) -> xr.Dataset:
spin_angle = (L2_HI_SECTORED_ANGLE[:, np.newaxis] + elevation_angles) % 360.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tech3371 Im honestly still pretty confused about this. From my understanding:
This (L2_HI_SECTORED_ANGLE[np.newaxis, :] + elevation_angles) % 360.0 already creates an array that is spin_sector by elevation angle. Unless the variable names are mismatched? I have no understanding of l2 hi sectored code so I was wondering if this change made sense to you? Michael confirmed that the transpose was needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into the details. It's been a while for me and I can look into where we should update.


# Add spin angle variable using the new elevation_angle dimension
l2_dataset["spin_angle"] = (("spin_sector", "elevation_angle"), spin_angle)
# Spin angle needs to be transposed to have dimensions
# (spin_sector, elevation_angle) to match the L2 dataset dimensions
l2_dataset["spin_angle"] = (("spin_sector", "elevation_angle"), spin_angle.T)
l2_dataset["spin_angle"].attrs = cdf_attrs.get_variable_attributes(
"spin_angle", check_schema=False
)
Expand Down
Loading