cmsgemos-analysis merge requestshttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests2022-10-31T18:26:25+01:00https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/39Fix crash while generating front-end configuation files2022-10-31T18:26:25+01:00Laurent PetreFix crash while generating front-end configuation files## Description
<!-- Describe your changes in detail -->
The title says it all... Fixes a bug introduced in 3a45cb6...
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new fea...## Description
<!-- Describe your changes in detail -->
The title says it all... Fixes a bug introduced in 3a45cb6...
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
None, discovered within hours when deployed to production.
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
The fix routines can generate seamlessly correct front-end configuration files in the CMS production system.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/38Add a feature to produce OptoHybrid configurations with S-bit delays2022-10-27T16:56:30+02:00Laurent PetreAdd a feature to produce OptoHybrid configurations with S-bit delays## Description
<!-- Describe your changes in detail -->
_Based on top of !37._
All is in the title... The routine ingest file structured like:
```
fed;slot;oh;vfat;group;delay
1467;1;0;0;0;2
1467;1;0;0;1;2
1467;1;0;0;2;2
1467;1;0;0;3;2...## Description
<!-- Describe your changes in detail -->
_Based on top of !37._
All is in the title... The routine ingest file structured like:
```
fed;slot;oh;vfat;group;delay
1467;1;0;0;0;2
1467;1;0;0;1;2
1467;1;0;0;2;2
1467;1;0;0;3;2
1467;1;0;0;4;2
1467;1;0;0;5;2
1467;1;0;0;6;2
[...]
```
where `delay` is the expected effective delay in BX for the group. And produces OptoHybrid configuration files such as:
```
TRIG.SBIT_BX_DELAY.VFAT0_GROUP0 1
TRIG.SBIT_BX_DELAY.VFAT0_GROUP1 1
TRIG.SBIT_BX_DELAY.VFAT0_GROUP2 1
TRIG.SBIT_BX_DELAY.VFAT0_GROUP3 1
TRIG.SBIT_BX_DELAY.VFAT0_GROUP4 1
TRIG.SBIT_BX_DELAY.VFAT0_GROUP5 1
TRIG.SBIT_BX_DELAY.VFAT0_GROUP6 1
[...]
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP0 1
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP1 1
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP2 1
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP3 1
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP4 1
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP5 1
TRIG.SBIT_BX_DELAY_EN.VFAT0_GROUP6 1
[...]
```
with the usual `fed1467-slot1/config-oh0.cfg` naming convention.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Got an example CSV-file with the desired effective delays. The per-OH output files match the expectations.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/37Make a routine to analyze the cluster mask rate scan2023-04-06T15:38:40+02:00Camilla GalloniMake a routine to analyze the cluster mask rate scan## Description
<!-- Describe your changes in detail -->
MR is prepared and left in draft just in case the format of the masking is decided soon in the firmware.
At the moment the masking is implemented as a window of a certain width, st...## Description
<!-- Describe your changes in detail -->
MR is prepared and left in draft just in case the format of the masking is decided soon in the firmware.
At the moment the masking is implemented as a window of a certain width, starting at some delay (BX units).
It seems convenient to implement a mask based on individual delays, since in most of the onto hybrids the scan results favor delays that are not adjacent.
Output files for both cases are produced, with plots (optional).
At the moment the pool implementation for making plots in parallel is not working.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Output of the analysis of a scan taken in p5 is : `/afs/cern.ch/work/c/cgalloni/public/4Laurent/cluster-mask-scan-out-width1-2sigma-2022082604`
<!-- ## Screenshots (if appropriate): -->
![fed1467-slot1-oh2](/uploads/529f2ba1801aca0a373a1a5d13144936/fed1467-slot1-oh2.png)
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [ ] All new and existing tests passed.Camilla GalloniCamilla Gallonihttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/36Set range in S-bit rate scan plot2022-05-13T20:13:35+02:00Camilla GalloniSet range in S-bit rate scan plot## Description
<!-- Describe your changes in detail -->
This MR aims at setting a maximum for the axis of the sbit rate plots that depends on the maximum rate registered in the run, which depends on the time interval.
## Related Issue
<...## Description
<!-- Describe your changes in detail -->
This MR aims at setting a maximum for the axis of the sbit rate plots that depends on the maximum rate registered in the run, which depends on the time interval.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [ ] All new and existing tests passed.Camilla GalloniCamilla Gallonihttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/35Threshold scan analysis2022-12-07T19:46:51+01:00Daniel EstradaThreshold scan analysis## Description
This MR aims at implementing an analysis routine for the threshold scan. In particular, the following features are implemented:
* Non-working channels are identified and saved into a file (distinguishing between broken c...## Description
This MR aims at implementing an analysis routine for the threshold scan. In particular, the following features are implemented:
* Non-working channels are identified and saved into a file (distinguishing between broken channels and the channels from a not readout VFAT).
* A report with the fractions of working, broken, and not-readout channels for each FED and OH is printed on the console.
* 3D histograms are made to display the number of hits for each channel as a function of the threshold.
## Related Issue
Fixes #42.
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
The current code `thr_scan_analysis.py` can be used through `gemos` command.
```
gemos analyze thresh inputfiles outputdir [--mapping] [--plotting]
```
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [X] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [X] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [X] All new and existing tests passed.Daniel EstradaDaniel Estradahttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/33Add sanity check on VFAT config DB dump2022-04-07T09:34:11+02:00Daniel EstradaAdd sanity check on VFAT config DB dump## Description
The `dump_database` routine in `vfat_calibratios.py` produces from DB a `DataFrame` with a duplicate VFAT, this creates warnings downstream as in the case of issue #43.
## Related Issue
Closes #41
<!-- This project only ...## Description
The `dump_database` routine in `vfat_calibratios.py` produces from DB a `DataFrame` with a duplicate VFAT, this creates warnings downstream as in the case of issue #43.
## Related Issue
Closes #41
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues according to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
I checked if the output file contained any duplicate line with
```
uniq -c output_file -d
```
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- ## Screenshots (if appropriate): -->
## Types of changes
I included a line of code to drop duplicates chips before writing the VFAT calibration parameters file.
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/32Add sanity check on VFAT config DB dump2022-04-06T22:43:08+02:00Daniel EstradaAdd sanity check on VFAT config DB dump## Description
The `dump_database` routine in `vfat_calibratios.py` produces from DB a `DataFrame` with a duplicate VFAT, this creates warnings downstream as in the case of issue #43.
## Related Issue
Closes #41
<!-- This project only ...## Description
The `dump_database` routine in `vfat_calibratios.py` produces from DB a `DataFrame` with a duplicate VFAT, this creates warnings downstream as in the case of issue #43.
## Related Issue
Closes #41
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues according to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
I checked if the output file contained any duplicate line with
```
uniq -c output_file -d
```
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- ## Screenshots (if appropriate): -->
## Types of changes
I included a line of code to drop duplicates chips before writing the VFAT calibration parameters file.
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.Daniel EstradaDaniel Estradahttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/30Fix the DAC scan warning plotting option2022-05-05T19:27:29+02:00Daniel EstradaFix the DAC scan warning plotting option## Description
There was a typical "copy-paste" error in [dac_scan_analysis.py-line 222](https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/blob/main/gemos/analysis/dac_scan_analysis.py#L222) with the `output_df` assignment...## Description
There was a typical "copy-paste" error in [dac_scan_analysis.py-line 222](https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/blob/main/gemos/analysis/dac_scan_analysis.py#L222) with the `output_df` assignment.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
Closes issue #44.
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Changing that line of code resolves the problem.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Daniel EstradaDaniel Estradahttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/29Fix typo in VFAT config latency2022-03-10T13:08:21+01:00Camilla GalloniFix typo in VFAT config latency## Description
<!-- Describe your changes in detail -->
Fix silly typo
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue f...## Description
<!-- Describe your changes in detail -->
Fix silly typo
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Change already implemented in `gem-locdaq02.cms` at p5.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Camilla GalloniCamilla Gallonihttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/28Fix typo in vfat config creator2022-03-10T10:36:49+01:00Camilla GalloniFix typo in vfat config creator## Description
<!-- Describe your changes in detail -->
Fix silly typo
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue fir...## Description
<!-- Describe your changes in detail -->
Fix silly typo
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [ ] All new and existing tests passed.Camilla GalloniCamilla Gallonihttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/27Add latency to create VFAT configuration files2022-03-09T14:52:56+01:00Camilla GalloniAdd latency to create VFAT configuration files## Description
<!-- Describe your changes in detail -->
Title says it all.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an iss...## Description
<!-- Describe your changes in detail -->
Title says it all.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Will be tested at p5.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Camilla GalloniCamilla Gallonihttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/26Fix the DAC scan plotting of VFAT with warning2022-03-07T18:17:10+01:00Laurent PetreFix the DAC scan plotting of VFAT with warning## Description
<!-- Describe your changes in detail -->
This MR fixes bugs encountered running on DAC scans from p5 with multiple problematic VFAT and missing scans, namely:
* Fix a bug when the analysis was crashing if some VFAT from ...## Description
<!-- Describe your changes in detail -->
This MR fixes bugs encountered running on DAC scans from p5 with multiple problematic VFAT and missing scans, namely:
* Fix a bug when the analysis was crashing if some VFAT from the layout tree weren't included in the scan.
* Fix a bug leading to too many VFAT being plotted in "warning-only plotting" mode
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
The code now runs on the most recent p5 dataset, plotting only the VFAT with warnings, without changing the result of the scan.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/25Render DAC scans plot for VFATs with failing DAC by default2022-03-03T18:25:38+01:00Laurent PetreRender DAC scans plot for VFATs with failing DAC by default## Description
<!-- Describe your changes in detail -->
This MR allows plotting only VFAT with a failing DAC. The option `-p/--plotting` is modified to take any of `{always, never, warning}`
It was implemented in two steps:
* Refactor ...## Description
<!-- Describe your changes in detail -->
This MR allows plotting only VFAT with a failing DAC. The option `-p/--plotting` is modified to take any of `{always, never, warning}`
It was implemented in two steps:
* Refactor the DAC scans routine to split the analysis from the plotting
* Implement the conditional plotting option
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
Fixes #38.
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Tested on the 72 VFAT of the GE1/1 integration setup. The chosen DAC values did not change. The plotting option behaves as expected.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/24Use GBT and elink numbers in GBT configuration2023-06-23T17:57:42+02:00Antonello PellecchiaUse GBT and elink numbers in GBT configuration## Description
Created to match with [cmsgemos MR 241](https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos/-/merge_requests/241). The new output configuration file uses the format `PHASE_GBT<n>_ELINK<m> <phase>` for each GBT and each el...## Description
Created to match with [cmsgemos MR 241](https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos/-/merge_requests/241). The new output configuration file uses the format `PHASE_GBT<n>_ELINK<m> <phase>` for each GBT and each elink.
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
Tested in GE2/1 integration stand at B904.
Tested again after newest changes, still working.
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.Antonello PellecchiaAntonello Pellecchiahttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/23Optionally plot the DAC scans2022-02-22T16:13:50+01:00Camilla GalloniOptionally plot the DAC scans## Description
<!-- Describe your changes in detail -->
This aims at:
- improving the clarity of the options in gemos
- introduce the options not to plot the DAC scan results (now default)
- state in the warning for which VFATs the DAC s...## Description
<!-- Describe your changes in detail -->
This aims at:
- improving the clarity of the options in gemos
- introduce the options not to plot the DAC scan results (now default)
- state in the warning for which VFATs the DAC scan fit fails
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Coffin setup
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [ ] All new and existing tests passed.Camilla GalloniCamilla Gallonihttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/22file restructuring done and poetry integration for the revamped analysis suite2023-06-23T17:57:42+02:00Pranjal Sharmafile restructuring done and poetry integration for the revamped analysis suite## Description
<!-- Describe your changes in detail -->
This MR implements the Analysis Suite framework which provides a robust way to handle results of GEM hardware calibration procedures and data. It provides a command-line interface ...## Description
<!-- Describe your changes in detail -->
This MR implements the Analysis Suite framework which provides a robust way to handle results of GEM hardware calibration procedures and data. It provides a command-line interface to:
- Import data into the analysis suite
- Keep track of imported data, the run number, and file versions (revision) for each run
- retrieve the files imported for given file name, revision, run number
More details can be found here: https://codimd.web.cern.ch/lDdIGeVZR_C28XUNE4h90g?view
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.https://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/21Add script to create VFAT configuration file from scan results2021-11-05T19:48:10+01:00Antonello PellecchiaAdd script to create VFAT configuration file from scan results## Description
Add an option to `gemos` to create VFAT configuration files. The command takes as input a folder with a well-known file structure* and produces as output a folder with the same file structure and updated parameters.
In t...## Description
Add an option to `gemos` to create VFAT configuration files. The command takes as input a folder with a well-known file structure* and produces as output a folder with the same file structure and updated parameters.
In the absence of an input file, a default configuration file can be used. This is typically used to bootstrap a new configuration based on the setup description.
The following parameters are currently supported:
* The VFAT calibration parameters retrieved from the database
* The results of the DAC scans
* The thresholds based on the results of the S-bit rate scans analysis routine
Usage example:
``` sh
gemos create-config vfat --default default.cfg -c calibration/fed0001-slot01.cfg -d dacScan/dac_Scans.cfg -t sBitRateScan/sbits_1.cfg -t sBitRateScan/sbits_2.cfg results/vfatConfig/
```
* The files will be organized in subfolders named `fed<xxxx>-slot<y>`.
## Related Issue
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
Closes #35.
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Tested with results of scans performed on the VFATs available in the lab on a GE2/1 setup as well as the GE1/1 integration setup chambers.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreAntonello PellecchiaLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/20Retrieve VFAT calibration parameters from database2021-11-05T15:17:07+01:00Antonello PellecchiaRetrieve VFAT calibration parameters from database## Description
This MR adds to `gemos` a command that dumps to a CSV-like file the VFAT calibration parameters obtained from a query to the database.
Example of usage:
```
poetry run gemos poetry run gemos query vfat-calibration vfat-c...## Description
This MR adds to `gemos` a command that dumps to a CSV-like file the VFAT calibration parameters obtained from a query to the database.
Example of usage:
```
poetry run gemos poetry run gemos query vfat-calibration vfat-calibrations.dat
```
The file `vfat-calibrations.dat` is sanitize and contains the following information:
```
chip-id;vref-adc;iref;adc0-m;adc0-b;cal-dac-m;cal-dac-b
1230;3;29;1.9089;-324.593;-0.272049;67.5893
1231;3;39;1.89825;-318.341;-0.229325;56.4414
1232;3;29;1.98346;-325.632;-0.245428;61.0245
1233;3;33;1.87333;-307.779;-0.229754;56.3122
1234;3;35;1.90041;-317.408;-0.245102;60.4882
1235;3;27;1.94132;-319.831;-0.23473;57.6574
1236;3;33;1.9382;-320.212;-0.23664;58.5432
1237;3;35;1.96087;-326.629;-0.251636;62.2413
1238;3;31;1.92872;-329.099;-0.257939;63.8939
```
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
Closes #34.
## How Has This Been Tested?
Tested on some VFATs found lying around in the lab :)
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreAntonello PellecchiaLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/19S-bit rate scan analysis2022-02-22T16:05:13+01:00Antonello PellecchiaS-bit rate scan analysis## Description
Add a command to `gemos` to analyze the results of the sbit rate scans. The command takes as input the files containing the result of the threshold scan (can be for different VFATs and different iterations) and the rate to...## Description
Add a command to `gemos` to analyze the results of the sbit rate scans. The command takes as input the files containing the result of the threshold scan (can be for different VFATs and different iterations) and the rate to be accepted to determine the VFAT threshold. The output file contains the thresholds in DAC units for each VFAT.
Example of usage:
```
poetry run gemos analyze sbit -r 100 /gemdata/sBitRateScan/fed1478-slot07.txt /gemdata/results/sBitRateScan/fed1478-slot07.cfg
```
Example of sbit scan plot:
![fed1478-slot7-oh1](/uploads/e2f84079948e55640a64c20e32234506/fed1478-slot7-oh1.png)
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
Tested on the results of a threshold scan taken on a GE2/1 module.
<!-- ## Screenshots (if appropriate): -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreAntonello PellecchiaLaurent Petrehttps://gitlab.cern.ch/cmsgemonline/gem-daq/cmsgemos-analysis/-/merge_requests/18Create script to analyze DAC scans2022-02-22T16:02:46+01:00Antonello PellecchiaCreate script to analyze DAC scans## Description
This MR adds an option to the `gemos` command that takes as an input the result of a DAC scan and creates an output file with the optimal DAC values to be set for each VFAT. Example of usage:
``` sh
poetry run gemos anal...## Description
This MR adds an option to the `gemos` command that takes as an input the result of a DAC scan and creates an output file with the optimal DAC values to be set for each VFAT. Example of usage:
``` sh
poetry run gemos analysis dac ~/daq/examples/gemdata/dacScan/fed1478-slot07.txt ~/daq/examples/results/dacScan/fed1478-slot07.cfg
```
## Related Issue
<!-- This project only accepts pull requests related to open issues -->
<!-- If suggesting a new feature or change, please discuss it in an issue first -->
<!-- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!-- If addressing multiple issues, comment on their relation if needed -->
<!-- Please link issues accordgin to the automation rules: -->
<!-- https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically -->
## How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
<!-- see how your change affects other areas of the code, etc. -->
Tested on the result of DAC scan performed on a GE2/1 chamber.
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
## Checklist:
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.Laurent PetreAntonello PellecchiaLaurent Petre