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

Roll data and update unit conversion object #219

Open
weisscharlesj opened this issue Aug 17, 2024 · 1 comment
Open

Roll data and update unit conversion object #219

weisscharlesj opened this issue Aug 17, 2024 · 1 comment

Comments

@weisscharlesj
Copy link
Contributor

Is there a way to reference the data that also updates the unit conversion object? I'm rolling the data in the frequency domain to reference the data correctly (i.e., move TMS to 0.0 ppm), but this is causing issues with integrating the data later on because the unit conversion object is not aware of the shift.

@kaustubhmote
Copy link
Collaborator

kaustubhmote commented Aug 20, 2024

Currently, a unit conversion object once created is not designed to be updated. You will have to manually create a new unit conversion object with the new carrier frequency. However, there is a 'hack' that will work:

new_carrier_frq = uc._car + 100 # change this according to how your axis needs to be updated
uc.__init__(uc._size, uc._cplx, uc._sw, uc._obs, new_carrier_frq)

I think it is a good idea to add this functionality to the uc object so that the carrier frequency can be updated. The use case that you describe is common enough for this to be useful. I will mark this issue as an enhancement proposal for people to consider.

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

No branches or pull requests

2 participants