Skip to content

pycorsikaio to astropy Qtable #28

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ pip install corsikaio

## Features

Load CORSIKA binary particle or cherenkov data files using python and numpy.
### Simple native reading

Load CORSIKA binary particle or Cherenkov data files using python and numpy.

Also supports MMCS 6.5

Expand All @@ -32,5 +34,28 @@ with CorsikaCherenkovFile('cer000001') as f:
plt.show()
```

### Astropy table

> **Note**
> You need to install ``astropy`` along _pycorsikaio_ to use this feature.

```python
from corsikaio.reader import CorsikaReader

input_corsika_file = "DAT00001"

reader = CorsikaReader(
input_corsika_file,
max_events=5,
load_run_headers=False,
load_event_headers=False,
load_particles=True,
load_longitudinal=False,
load_event_ends=False,
load_run_ends=False,
selected_keys=["event_number", "particle_description", "x", "y"],
)

table = reader.read()
```

Loading