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

New year, new arina data #701

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

smribet
Copy link
Collaborator

@smribet smribet commented Dec 29, 2024

A few small updates to the Arina reader:

  • default square scan
  • optional transpose to accommodate new and old files
  • metadata reading for new files

Example here.

Copy link
Member

@gvarnavi gvarnavi left a comment

Choose a reason for hiding this comment

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

lgtm, added two minor comments but will go ahead and approve regardless.


if median_filter_masked_pixels_array is not None and binfactor == 1:
datacube = datacube.median_filter_masked_pixels(
median_filter_masked_pixels_array, median_filter_masked_pixels_kernel
)

try:
with h5py.File(f"{filename[:-10]}.h5", "r") as f:
Copy link
Member

Choose a reason for hiding this comment

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

let's add a comment here to make sure we don't forget that [:-10] comes from dropping the "_master" suffix?

mem="RAM",
binfactor: int = 1,
dtype_bin: float = None,
fix_transpose=False,
Copy link
Member

Choose a reason for hiding this comment

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

It would be great if this default could None, and we could (reliably) detect whether the file is using the old/new ARINA format and set a default value accordingly if not passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants