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

implemented xb.plot_bitinformation for 16- and 64-bit inputs #186

Closed
wants to merge 2 commits into from

Conversation

kar-hik
Copy link

@kar-hik kar-hik commented Apr 4, 2023

So this code is basically analyzing a dataset by looking at the information content of each bit in the dataset along the longitude dimension. The xb.get_bitinformation() function calculates the amount of information that each bit holds in the dataset.

Next, the code sets a threshold for the amount of information that each bit should have. This threshold is based on the maximum value of the 64-bit range of the dataset.

Then, the code selects only the bits that have an information content above this threshold and stores this information in a new variable info_per_bit_cleaned.

Finally, the code plots the information content of each bit position in the dataset along the longitude dimension, using the matplotlib package. It also adds a line representing the threshold and formats the plot with axis labels and a title.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@aaronspring
Copy link
Collaborator

Please use .plot() only on xr.DataArray and not xr.Dataset, see error in https://readthedocs.org/projects/xbitinfo/builds/20006086/

@observingClouds
Copy link
Owner

Hi @kar-hik,
Do you understand the error message that @aaronspring has linked here? You can also look at this error report. You basically want to change the call to something like info_per_bit_cleaned[<variable>].plot(ax=ax,yincrease=False).
It would be great if you could solve this issue.

@observingClouds
Copy link
Owner

observingClouds commented Jun 24, 2023

Superseeded by #218

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.

3 participants