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

Calibration events in NSB only simulations skipped #61

Open
kpfrang opened this issue Mar 14, 2018 · 2 comments
Open

Calibration events in NSB only simulations skipped #61

kpfrang opened this issue Mar 14, 2018 · 2 comments

Comments

@kpfrang
Copy link
Member

kpfrang commented Mar 14, 2018

When reading NSB simulation file it correctly recognizes that calibration events and prints RDLR: CALIBEVENT!. However, I cannot access these events which makes me think that they are skipped.


Example for gamma_20deg_180deg_run4___cta-prod3-demo_desert-2150m-Paranal-baseline-5x.simtel.gz

bildschirmfoto 2018-03-14 um 14 59 01

As you can see I don't have any event read with event_source for the NSB file, even though 100 events should be contained in the file (which equals the number for times RDLR: CALIBEVENT! is printed out).

Should they not be readable in exactly the same way as other simtel files as well?

@kpfrang kpfrang changed the title Calibration events in NSB simulations seem to be skipped Calibration events in NSB only simulations skipped Mar 14, 2018
@kosack
Copy link
Contributor

kosack commented Mar 14, 2018

We've never tried reading calib events, so it may require some modification. That means we should also support getting the event trigger type flag so we can cut on that in ctapipe.

This probably just comes from the fact that pyhessio is based on read_hess.c, which was written to analyze normal events only, so it may skip others.

@GernotMaier
Copy link
Contributor

I am using in my hessio reader used for eventdisplay something like:

                   if( find_io_block( iobuf, &item_header ) != 0 )
                    {
                            break;
                    }       

                    // check header types
                    switch( ( int ) item_header.type )
                    {            
                            // ... obviously lot's of other 'case' statements here

                            case IO_TYPE_HESS_CALIBEVENT:
                            {
                                    int type = -1;
                                    rc = read_hess_calib_event( iobuf, &hsdata->event, -1, &type );
                                    if( verbose || rc != 0 )
                                    {
                                            printf( "read_hess_calib_event(), rc = %d, type=%d\n", rc, type );
                                    }
                                   
                                   //.. do here whatever you need to do to convert / expose the data
                            }
                 }

......

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

3 participants