ELogs/SoniaEscribano: Difference between revisions

From PBTWiki
Jump to navigation Jump to search
 
(28 intermediate revisions by the same user not shown)
Line 3: Line 3:
== To Do ==
== To Do ==


* Port Saad's FPGA data replay code to Python → copied
* Compilation for pi4 (tested an working)
* Duplicate functionality of Fern's GUI in D3.
g++ -L/opt/local/lib -I/opt/local/include/libftdi1 -lftdi1 -std=c++17 -Wno-psabi -O3 -pthread FTDI.cpp -o FTDI
 
* Compiling to pi5: gives an error -> fatal error: ftdi.h: No such file or directory
 
If we use  g++ -L/usr/lib -I/usr/include/libftdi1 -lftdi1 -pthread -std=c++17 -O3 -Wno-psabi FTDI.cpp -o FTDI
 
we also get an error. We modify the code to the following, this gives a warning but creates the executable
 
g++ -L/usr/lib -I/usr/include/libftdi1 -std=c++17 -O3 -Wno-psabi FTDI.cpp -o FTDI -lftdi1 -pthread
 
 
* Geant4 calibration source
 
sdf
 
pi@raspberrypi:~/Photodiodes $ g++ -L/usr/lib -I/usr/include/libftdi1 -std=c++17 -O3 -Wno-psabi FTDI.cpp -o FTDI -lftdi1
FTDI.cpp: In function ‘int main(int, char**)’:
FTDI.cpp:131:33: warning: ‘int ftdi_usb_purge_buffers(ftdi_context*)’ is deprecated [-Wdeprecated-declarations]
  131 |    ret = ftdi_usb_purge_buffers(ftdi);                            //flush data currently in the buffer
      |          15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)~~^15:31, 24 January 2024 (UTC)
In file included from FTDI.cpp:8:
/usr/include/libftdi1/ftdi.h:567:20: note: declared here
  567 |    int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
      |                    ^15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)~
/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func


== GUI ==
== GUI ==
'''Version 2.1'''
This version displays the data from a file selected via a dropdown menu (using php), the Kelleter and Bortfeld curves, and the energy and range of the beam as a legend.
[https://www.hep.ucl.ac.uk/pbt/PDdisplay/escribano/v2.1/ https://www.hep.ucl.ac.uk/pbt/PDdisplay/escribano/v2.1/]
* Create a file with Manchester data
* Fix cache busting in Google Chrome
* Overlap between users in different browsers
* Determine number of points per PD for files
* Responsivity in different devices is not considered
'''Version 2.06'''
Version 2.06 has a unique start/stop button and displays live data when running a shell script via terminal.
* Zooming issue: PDdata and fitted data do not scale at the same rate, when zooming there is a shifting between the two -> Use linear scales for both ✓
* When clicking stop freeze the graph but do not make it dissapear  ✓
* Modify code to give - instead of 0 when fit not performed ✓
* Modify code to give - instead of 0 when fit not performed ✓
* Plot data with 20 points ✓
* Plot data with 20 points ✓
* Upload files to new directory
 
 
'''Version 2.05'''
 
Version 2.05 has two separate start and stop button
 
* Upload files to new directory
* Modify position of error bars ✓
* Modify position of error bars ✓
* x-axis zooming problem: only some numbers work ✓
* x-axis zooming problem: only some numbers work ✓
* Fix misalignment between PDdata and FITdata ✓
* Fix misalignment between PDdata and FITdata ✓
* Test access from NUC PC
* Test access from NUC PC
 
 
== Knowledge Transfer ==
- Future work in QuARC: [https://www.hep.ucl.ac.uk/pbt/wiki/Proton_Calorimetry/Future_Work https://www.hep.ucl.ac.uk/pbt/wiki/Proton_Calorimetry/Future_Work]
 
- Summary : [https://www.hep.ucl.ac.uk/pbt/wiki/Proton_Calorimetry/Equipment/QuARC_General_Information https://www.hep.ucl.ac.uk/pbt/wiki/Proton_Calorimetry/Equipment/QuARC_General_Information]


== Replay + Fit ==
== Replay + Fit ==
* Fit data with 20 points instead of 10 to avoid harsh lines
Two different codes are used for the data analysis: replay.py and fit.cpp, their functionalities are described below.
* Print date and time of original file, not produced ones
 
* Create only one calibration with backST and frontST
replay.py code calibrates and subtracts the background of each measurement, generating an output text file with header information, all the individual calibrated measurements and the average of them all. An example file with data from Clatterbridge Hospital of what the generated file looks like can be found here [https://www.hep.ucl.ac.uk/pbt/wikiData/data/GUI-Clatterbridge/Run001_calibrated.txt], every individual run fit takes ~3.3s on a MacBook to be completed. All of them can be processed together by running the shell script ./replayshell.sh. To run this code we need the following arguments:
* Test code on NUC PC
python3 replay.py t_INT framerate skipahead reverse folder run background backST frontST
 
fit.cpp averages the data at a user specified frequency (or generic 25 Hz) and then performs Bortfeld and Kelleter fits to the data. After the fitting, the beam energy and range are extracted for each of those averaged measurements. All of them can be processed together by running the shell script ./fitshell.sh An example of what the output of fit.cpp looks like can be found here [https://www.hep.ucl.ac.uk/pbt/wikiData/data/GUI-Clatterbridge/Run001_fitted_25Hz.txt]. This code needs to be compiled, and then run with the appropriate arguments.
g++ -o fit fit.cpp `root-config --cflags --glibs` -O3
./fit reverse energy facility folder run (frequency)
 
To show these data in the GUI a shell script that iterates through the lines of the fitted output file is necessary.
 
Previously both of the codes were developed in cpp. The replay.cpp replays the DDC232 acquisition by either stepping through each measurement or averaging measurements at specified frame rate, while fit.cpp performs the fit on calibrated and background subtracted data.


== Done ==
== Done ==
Line 29: Line 91:
* Set up new MacBook Pro: might need dual booting (talk to Tony Hoare about Windows).
* Set up new MacBook Pro: might need dual booting (talk to Tony Hoare about Windows).
* Set up Geant4 simulations of detector → copied and running
* Set up Geant4 simulations of detector → copied and running
* Port Saad's FPGA data replay code to Python → copied
* Duplicate functionality of Fern's GUI in D3.


== Quick-start ==
== Quick-start ==
 
* Send a copy of pasport/ID so they can set up a contract (Bonita Carboo). Then a videocall needs to be arranged to check passport.
* Get user name + email
* Proof of right to work (share code via gov.uk)
* Sign online contract. Your employee number is here.
* Once you have an employee number you can check your user ID and email account [https://myaccount.ucl.ac.uk/new-staff]
* Welcome email with infromation for new staff member, probation and guidance [https://www.ucl.ac.uk/human-resources/ucl-induction-and-probation-policy#Policy]
* Check and complete the induction checklist (received on the welcome email)
* Get ID card: book appointment online ✓
* Get ID card: book appointment online ✓
* Mandatory safety training courses: Safety Induction + Fire Safety ✓
* Mandatory safety training courses: Safety Induction + Fire Safety ✓
Line 48: Line 116:
! style="text-align: center;" | Event
! style="text-align: center;" | Event
|-
|-
|23rd Sep 2022 || VIVA York
|26th-27th October 2023|| Ion Imaging Workshop London
|-
|11th-13th October 2023|| ACCMED course Pavia
|-
|25th-28th July 2023|| FPGA Course RAL
|-
|3rd-7th July 2023|| HIT Online course
|-
|10th-16th June 2023|| PTCOG Conference Madrid
|-
|-
|20th Oct 2022 || Prague
|18th May 2023|| Clatterbridge beam test
|-
|-
|21st Oct 2022 || HEP Seminar
|5th Apr 2023|| PGI Seminar @Queen Mary
|-
|-
|25-26th Oct 2022 || Manchester beam test
|8th Feb 2023 || QuARC Seminar @Bristol
|-
|-
|24-25th Nov 2022 || Groningen beam test
|20th Jan 2023 || PhD Graduation York
|-
|-
|30th Nov -  2nd Dec 2022 || FRPT Conference Barcelona
|30th Nov -  2nd Dec 2022 || FRPT Conference Barcelona
|-
|-
|20th Jan 2023 || PhD Graduation York
|24-25th Nov 2022 || Groningen beam test
|-
|25-26th Oct 2022 || Manchester beam test
|-
|-
|8th Feb 2023 || QuARC Seminar @ Bristol
|21st Oct 2022 || HEP Seminar
|-
|-
|5th Apr 2023|| PGI Seminar @ Queen Mary
|20th Oct 2022 || Prague
|-
|-
 
|23rd Sep 2022 || VIVA York
|}
|}

Latest revision as of 15:31, 24 January 2024

Electronic Log for Sonia Escribano

To Do

  • Compilation for pi4 (tested an working)

g++ -L/opt/local/lib -I/opt/local/include/libftdi1 -lftdi1 -std=c++17 -Wno-psabi -O3 -pthread FTDI.cpp -o FTDI

  • Compiling to pi5: gives an error -> fatal error: ftdi.h: No such file or directory

If we use g++ -L/usr/lib -I/usr/include/libftdi1 -lftdi1 -pthread -std=c++17 -O3 -Wno-psabi FTDI.cpp -o FTDI

we also get an error. We modify the code to the following, this gives a warning but creates the executable

g++ -L/usr/lib -I/usr/include/libftdi1 -std=c++17 -O3 -Wno-psabi FTDI.cpp -o FTDI -lftdi1 -pthread


  • Geant4 calibration source

sdf

pi@raspberrypi:~/Photodiodes $ g++ -L/usr/lib -I/usr/include/libftdi1 -std=c++17 -O3 -Wno-psabi FTDI.cpp -o FTDI -lftdi1 FTDI.cpp: In function ‘int main(int, char**)’: FTDI.cpp:131:33: warning: ‘int ftdi_usb_purge_buffers(ftdi_context*)’ is deprecated [-Wdeprecated-declarations]

 131 |     ret = ftdi_usb_purge_buffers(ftdi);                             //flush data currently in the buffer
     |           15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)~~^15:31, 24 January 2024 (UTC)

In file included from FTDI.cpp:8: /usr/include/libftdi1/ftdi.h:567:20: note: declared here

 567 |     int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
     |                    ^15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)15:31, 24 January 2024 (UTC)~

/usr/include/libftdi1/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’

 247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func

GUI

Version 2.1

This version displays the data from a file selected via a dropdown menu (using php), the Kelleter and Bortfeld curves, and the energy and range of the beam as a legend. https://www.hep.ucl.ac.uk/pbt/PDdisplay/escribano/v2.1/

  • Create a file with Manchester data
  • Fix cache busting in Google Chrome
  • Overlap between users in different browsers
  • Determine number of points per PD for files
  • Responsivity in different devices is not considered


Version 2.06

Version 2.06 has a unique start/stop button and displays live data when running a shell script via terminal.

  • Zooming issue: PDdata and fitted data do not scale at the same rate, when zooming there is a shifting between the two -> Use linear scales for both ✓
  • When clicking stop freeze the graph but do not make it dissapear ✓
  • Modify code to give - instead of 0 when fit not performed ✓
  • Plot data with 20 points ✓


Version 2.05

Version 2.05 has two separate start and stop button

  • Upload files to new directory ✓
  • Modify position of error bars ✓
  • x-axis zooming problem: only some numbers work ✓
  • Fix misalignment between PDdata and FITdata ✓
  • Test access from NUC PC ✓


Knowledge Transfer

- Future work in QuARC: https://www.hep.ucl.ac.uk/pbt/wiki/Proton_Calorimetry/Future_Work

- Summary : https://www.hep.ucl.ac.uk/pbt/wiki/Proton_Calorimetry/Equipment/QuARC_General_Information

Replay + Fit

Two different codes are used for the data analysis: replay.py and fit.cpp, their functionalities are described below.

replay.py code calibrates and subtracts the background of each measurement, generating an output text file with header information, all the individual calibrated measurements and the average of them all. An example file with data from Clatterbridge Hospital of what the generated file looks like can be found here [1], every individual run fit takes ~3.3s on a MacBook to be completed. All of them can be processed together by running the shell script ./replayshell.sh. To run this code we need the following arguments:

python3 replay.py t_INT framerate skipahead reverse folder run background backST frontST

fit.cpp averages the data at a user specified frequency (or generic 25 Hz) and then performs Bortfeld and Kelleter fits to the data. After the fitting, the beam energy and range are extracted for each of those averaged measurements. All of them can be processed together by running the shell script ./fitshell.sh An example of what the output of fit.cpp looks like can be found here [2]. This code needs to be compiled, and then run with the appropriate arguments.

g++ -o fit fit.cpp `root-config --cflags --glibs` -O3
./fit reverse energy facility folder run (frequency)

To show these data in the GUI a shell script that iterates through the lines of the fitted output file is necessary.

Previously both of the codes were developed in cpp. The replay.cpp replays the DDC232 acquisition by either stepping through each measurement or averaging measurements at specified frame rate, while fit.cpp performs the fit on calibrated and background subtracted data.

Done

  • PARTREC pictures uploaded to: /unix/pbt/data/partrec/20221125/Pictures
  • Cut Mylar foil sheets for Manchester experiment
  • Talk to Derek about Mylar foil.
  • Probation meeting with Simon (fill form)
  • Set up new MacBook Pro: might need dual booting (talk to Tony Hoare about Windows).
  • Set up Geant4 simulations of detector → copied and running
  • Port Saad's FPGA data replay code to Python → copied
  • Duplicate functionality of Fern's GUI in D3.

Quick-start

  • Send a copy of pasport/ID so they can set up a contract (Bonita Carboo). Then a videocall needs to be arranged to check passport.
  • Proof of right to work (share code via gov.uk)
  • Sign online contract. Your employee number is here.
  • Once you have an employee number you can check your user ID and email account [3]
  • Welcome email with infromation for new staff member, probation and guidance [4]
  • Check and complete the induction checklist (received on the welcome email)
  • Get ID card: book appointment online ✓
  • Mandatory safety training courses: Safety Induction + Fire Safety ✓
  • Book departamental safety induction with Lee Bebbington ✓
  • Mandatory training courses: GDPR, information security, freedom of information, DSE, diversity, unconscious bias, ✓
  • Create a wiki account ✓
  • Register for an account on the HEP Linux cluster (email support@hep.ucl.ac.uk) ✓
  • Install Geant4 (instructions: [5]) ✓
  • Set up bank details online on myHR ✓

Important Dates

Date Event
26th-27th October 2023 Ion Imaging Workshop London
11th-13th October 2023 ACCMED course Pavia
25th-28th July 2023 FPGA Course RAL
3rd-7th July 2023 HIT Online course
10th-16th June 2023 PTCOG Conference Madrid
18th May 2023 Clatterbridge beam test
5th Apr 2023 PGI Seminar @Queen Mary
8th Feb 2023 QuARC Seminar @Bristol
20th Jan 2023 PhD Graduation York
30th Nov - 2nd Dec 2022 FRPT Conference Barcelona
24-25th Nov 2022 Groningen beam test
25-26th Oct 2022 Manchester beam test
21st Oct 2022 HEP Seminar
20th Oct 2022 Prague
23rd Sep 2022 VIVA York