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

moving_x not working to select the data on a specific position with moving window #753

Open
Sanjeev273 opened this issue Oct 13, 2024 · 1 comment
Labels
happi related to the postprocessing tool happi

Comments

@Sanjeev273
Copy link

Sanjeev273 commented Oct 13, 2024

I am trying to extract the information of electron bunch using trackParticles diagnostic with moving window. I following fig I want capture the data on marked position.

2D_AMDensityXY_bunch1

track_part = S.TrackParticles(species = species_name, chunksize=chunk_size, sort=True, select="all(t>0, (moving_x > 370)*(moving_x < 395)) ", sorted_as="new_tracks", export_dir= save_dir[0], timesteps = [171000, 385000])

Here movig_x not working to select the particle. but other position coordinates are working. There is no change in the result, whether the filter condition applied or not.
Electron_bunch_evolution1

Steps to reproduce the problem

  • ...
@Sanjeev273 Sanjeev273 added the bug label Oct 13, 2024
@Z10Frank
Copy link
Contributor

As explained in the chat, it appears that your output file is corrupted.

Try using:

    track_part = S.TrackParticles(species=species_name, sort=False,timesteps=timestep).getData()[timestep]
    moving_x   = track_part["moving_x" ]

And then proceed with the analysis using the numpy array moving_x.

If the select strategy does not work because of the corruption of the file, try to make a boolean mask to use with the moving_x array.

@Z10Frank Z10Frank added happi related to the postprocessing tool happi and removed bug labels Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
happi related to the postprocessing tool happi
Projects
None yet
Development

No branches or pull requests

2 participants