Skip to content

Conversation

@RaghavaAlajangi
Copy link
Member

@RaghavaAlajangi RaghavaAlajangi commented Oct 6, 2025

This PR aims to fix issue #196 by replacing rtdc_ds id with data slot_identifier in the cache dictonary.

@codecov
Copy link

codecov bot commented Oct 6, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@RaghavaAlajangi RaghavaAlajangi marked this pull request as ready for review October 6, 2025 12:51
@RaghavaAlajangi
Copy link
Member Author

Hi @paulmueller
Please review these changes and let me know if they need any changes.

@paulmueller
Copy link
Member

paulmueller commented Oct 6, 2025

This solution uses the slot identifier string to identify which event to display. This works only if you switch vertically in the block matrix. However, it does not work if you switch horizontally in the block matrix, since this approach neglects the filter ray applied. This is why the id of the dataset was used before. I noticed that on one occasion it uses the id of the dataset and on another the id for the hierarchy parent of that dataset. Maybe that's the culprit?

@RaghavaAlajangi
Copy link
Member Author

I already looked into the id and hparent of the dataset usage. Thats not the culprit. Even if I have them the same, I guess the dataset is reinitializing every time and generating different ID's when I switch data slots.

@paulmueller
Copy link
Member

Ah ok, thanks for looking into it. In any case, the proposed solution won't work, because the different filters might lead to different event numbers and an event index might be invalid. If there is not other way around it, we might have to fix the "dataset is reinitializing every time and generating different ID's when I switch data slots" problem first.

@RaghavaAlajangi
Copy link
Member Author

But, how does the dataset ID deal with both vertical and horizontal switching? Does it create different IDs for the data slot and filter ray?

@paulmueller
Copy link
Member

Ideally, the id() of a dataset does not change when you switch between data slots. That means that each dataset in the block matrix (along each filter ray) should stay the same as long as the filters don't change. If a filter changes, then the filter ray changes and the datasets are regenerated. Every new dataset will be a new Python object and have their own unique id().

@RaghavaAlajangi
Copy link
Member Author

I already looked into the id and hparent of the dataset usage. Thats not the culprit. Even if I have them the same, I guess the dataset is reinitializing every time and generating different ID's when I switch data slots.

Hi Paul,
I was mistaken, it works fine with id(self.rtdc_ds.hparent).

@RaghavaAlajangi RaghavaAlajangi changed the title fix: cache selected event using dataslot id in quickview fix: cache user selected event using rtdc_ds.hparent id in quickview Oct 13, 2025
@paulmueller paulmueller merged commit 544e5e3 into DC-analysis:main Oct 15, 2025
5 checks passed
@paulmueller
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants