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

Allow re-compression at copy to frontend #407

Merged
merged 4 commits into from Mar 25, 2021

Conversation

JoranAngevaare
Copy link
Member

What is the problem / what does the code in this PR do
Allow re-compression when transferring from one frontend to the other.

Can you briefly describe how it works?
If the optional argument for a compressor is specified, use that as the compression algorithm by changing the metadata.

Can you give a minimal working example (or illustrate with a figure)?
https://github.com/XENONnT/analysiscode/blob/master/StraxTests/Copy_to_frontend_and_recompress.ipynb

strax/context.py Outdated
run_id: str,
target: str,
target_frontend_id: int = None,
target_compressor: str = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth considering passing non-null but type-correct "empty" default args here? So an empty string for the target_compressor and something equivalent for target_frontend_id?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, let me change the typecasting to typing.Optional[str]

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright, fixed in f8e0809

See typing.Optional for the documentation: https://docs.python.org/3/library/typing.html#typing.Optional

@JoranAngevaare JoranAngevaare merged commit 8ccb170 into AxFoundation:master Mar 25, 2021
@JoranAngevaare JoranAngevaare deleted the recompressor branch March 25, 2021 10:41
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.

None yet

2 participants