Description

This notebook will perform the normalization of any Time-of-Flight (TOF) imaging data using either Timepix or Timepix3 data sets. The algorithm will take into account the proton charge and the the number of frames of each data sets to improve the normalization.

After selecting the top sample folder, containing 1 or many run numbers, from the autoreduce/mcp folder (data corrected for detector efficiency), the open beam (OB) folder(s) is selected, then the output folder where the data need to be exported at the end.

Tutorial

Select your IPTS

Need help using the IPTS selector?

Initialize notebook

Run this cell to prepare the script. The output part of the cell will give you the path to the working directory (based on the instrument and IPTS you selected in the first cell), and will indicate if the autoreduce folder (folder containing all the timepix1 auto-corrected data sets) has been found.

 

Pre-defined all input parameters – VENUS beamline only – OPTIONAL

For the VENUS beam line only, this cell will allow you to select the sample run(s), open beam run(s) and/or output folder. This is just to speed up the input process when you know the run numbers and don’t want to bother looking for them in the file system.

 

If any of the field is empty, you will still have the option to manually select them in the next few cells.

Select list of runs to normalize

Two different behaviors are possible.

  • if you manually enter the sample run(s) in the previous cell, the notebook will simply list the full path to the data set and report any issues (empty folder for example).
  • If you didn’t provide any sample run(s) in the previous cell, you will need to manually browse for this or those runs using the file selection tool.

Select list of open beam runs

Repeat the same procedure as for the sample (cell above)

Preview open beams – OPTIONAL

This optional cell will allow you to display the integrated signal of the open beam selected. Be patient as each first selection of an open beam folder will load the data, this will take a few seconds !

Select output folder

If you didn’t provide the output folder in the first cell, you must select here where you want to export the normalize images. A new folder based on the name of the sample folder will be created there.

example:

  • sample folder: this_is_my_data_set
  • output folder: this_is_my_data_set_normalized

Normalization settings

Define here how you want to run the normalization.

  • proton charge: the data sets will be each divided by the proton charge reported in the NeXus file
  • shutter counts: will take into account the difference of shutter counts reported by the timepix detector for each frame

Replace OB zeros by NaN will remove all the possible zeros found in the open beam data sets.

Distance source detector (m) will be used in the review plots where the transmission versus lambda (or energy) will be displayed.

Select what you want to export

 

This is where you select exactly what you want to export. All the files/folders will be created in the same output folder (reported when running the final step of the normalization)

Launch the normalization

All the open beam selected will be combined and used in the division of each of the sample runs selected.

The output cell will display the processes in progress and then display, for each of the sample runs selected, the following

  • Integrated signal of the sample run and Profile of entire stack (mean counts of full image vs file index)

  • Combined integrated open beam image and mean of full image vs file index

  • Integrated normalize image and again, mean of full image vs file index

  • Mean signal of normalized image vs lambda and energy

If you decided to export all the files possible like shown here,

 

The output will look like this

where each of the folder containing the following structure

 

For more information about the process, consult the log file at /SNS/VENUS/shared/logs/normalization_for_timepix.log