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

Invalid gain values in simulator #1033

Closed
graeme-winter opened this issue Nov 19, 2024 · 0 comments · Fixed by #1043 or #1044
Closed

Invalid gain values in simulator #1033

graeme-winter opened this issue Nov 19, 2024 · 0 comments · Fixed by #1043 or #1044
Labels
action - Bug Something isn't working as expected priority - High High priority status - resolved Issue has been resolved
Milestone

Comments

@graeme-winter
Copy link

graeme-winter commented Nov 19, 2024

*Distribution:

RHEL8 but this is not pertinent to the issue.

*Detector type:

Jungfrau SIMULATOR

*Software Package Version:

Current main

Priority:

Low

*Describe the bug

Invalid gain values in the simulated pixels:

        for (int i = 0; i < npixels; ++i) {
            if (i % pixelsPerPacket == 0) {
                ++dataVal;
            }

            if ((i % 1024) < 300) {
                gainVal = 1;
            } else if ((i % 1024) < 600) {
                gainVal = 2;
            } else {
                gainVal = 3;
            }
            pixelVal = (dataVal & ~GAIN_VAL_MSK) | (gainVal << GAIN_VAL_OFST);
        }

My understanding is that the legal values for the gain bits are 0, 1 and 3.

Expected behavior

The gain values correspond to the legal values

To Reproduce

Run the simulator

Additional context

I'll put a PR in to address this.

@graeme-winter graeme-winter added action - Bug Something isn't working as expected priority - Unclassified Priority not classified as yet status - Pending Task not yet started labels Nov 19, 2024
graeme-winter added a commit to graeme-winter/slsDetectorPackage that referenced this issue Nov 19, 2024
@thattil thattil added priority - High High priority status - On it Task in progress and removed priority - Unclassified Priority not classified as yet status - Pending Task not yet started labels Nov 20, 2024
@thattil thattil added this to the 9.0.0 Major milestone Nov 20, 2024
@thattil thattil added status - Awaiting review Awaiting review to close issue status - resolved Issue has been resolved and removed status - On it Task in progress status - Awaiting review Awaiting review to close issue labels Nov 20, 2024
@thattil thattil closed this as completed Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action - Bug Something isn't working as expected priority - High High priority status - resolved Issue has been resolved
Projects
None yet
2 participants