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

Correct negative field values #48

Open
ramirezdiego opened this issue Jul 3, 2023 · 1 comment
Open

Correct negative field values #48

ramirezdiego opened this issue Jul 3, 2023 · 1 comment

Comments

@ramirezdiego
Copy link
Collaborator

Not directly a fuse issue, but currently we have this piece of code to prevent crashes:

# Clip negative values to 0
n_negative_values = np.sum(electric_field_array['e_field'] < 0)
if n_negative_values > 0:
log.warning(f"Found {n_negative_values} negative electric field values. Clipping to 0.")
electric_field_array['e_field'] = np.clip(electric_field_array['e_field'], 0, None)

Let's make sure the loaded maps have the bining and format necessary so that we do not need this hack.

@ramirezdiego
Copy link
Collaborator Author

Applies also for clipping added in #140.

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

No branches or pull requests

1 participant