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

IO group is not saved to hdf5 file for TimestampPackets #249

Open
peter-madigan opened this issue Apr 11, 2022 · 2 comments
Open

IO group is not saved to hdf5 file for TimestampPackets #249

peter-madigan opened this issue Apr 11, 2022 · 2 comments
Labels

Comments

@peter-madigan
Copy link
Member

peter-madigan commented Apr 11, 2022

TimestampPackets only have a chip_key attribute (not an io_group field), so this is skipped when converting the packets to array data within the LArPix hdf5 format. This is a bug - we should be tracking the io_group data for all packet types.

@sam-fogarty
Copy link

@peter-madigan I've recently noticed this issue in larnd-sim when it simulates timestamp packets, since it uses larpix-control. Are there any plans to address this bug? Do you have a vision of how this bug could be addressed? Is it as "simple" as modifying packet/timestamp_packet.py?

@peter-madigan
Copy link
Member Author

No plans as far as I know, but this should be fixed.

I think it should be a simple fix of adding a property to the timestamp packet so that it will parse the io group out of the chip key if it is available. Something like:

@property
def io_group(self):
    if self.chip_key is not None:
        return None
    else:
        return self.chip_key.io_group

You'd also need to modify the method that creates the timestamp packets from the pacman messages:

def parse(msg, io_group=None):

This should add a chip key to the timestamp packet of io_group-0-0.

I'm about 90% sure that these two changes would solve the issue, but you would need to do some testing to verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants