Skip to content
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

Added EISCube.extract_points() #114

Merged
merged 4 commits into from
Feb 25, 2025

Conversation

MJWeberg
Copy link
Collaborator

Added a new EISCube.extract_points() method:

  • Users can input a list, array, or SkyCoord object (see SunPy coordinate tutorial) containing the coordinates of any points inside the EIS field-of-view. Pixel indices are also accepted by inputting an array and setting "units = 'pixel'" (Astropy units work fine too). Input world coords must be in the helioprojective coordinate frame and an obstime at or near the time of the EIS observation.
  • The .extract_points() method outputs a new EISCube with the data at the selected points (output shape of [1, N, n_wave]). Coordinate information about the selected points are stored in a new EISCube.meta['extracted'] dict. The method also updates .meta['date_obs'] and .meta['duration'] with the information at each point (rather than each raster position).
  • The new EISCube can be fit and the results saved to disk, just like any other EISCube

Other minor changes:

  • Slicing an EISCube will now update .meta['notes'] with a copy of the slice indices. This allows for better recordkeeping of data cutouts. This even works when slicing using real world coords and the .crop method, although only the array indices for the slice are noted.

@MJWeberg MJWeberg added the enhancement New feature or request label Feb 25, 2025
@MJWeberg MJWeberg self-assigned this Feb 25, 2025
@MJWeberg MJWeberg merged commit 0f824d4 into USNavalResearchLaboratory:main Feb 25, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant