generate Module
This module contains the code for generating a correction to electron drift behavior from a Garfield file.
generate_electron_correction(garf_file_path, output_path, params)
Generate the grid for the correction to electrons drifting the AT-TPC field
Need to convert garfield correction data into regularly spaced interpolation scheme over rho and z with the correct units
Garfield data format: [x_initial, y_initial, x_final, y_final, z_final, time] all in cm x=z, y=rho, x=transverse
Parameters:
Name | Type | Description | Default |
---|---|---|---|
garf_file_path |
Path
|
Path to a file containing the data generated by Garfield |
required |
output_path |
Path
|
Path to a numpy file for the interpolation grid to be saved to |
required |
params |
DetectorParameters
|
Configuration parameters for physical detector properties |
required |
Source code in src/spyral/correction/generate.py
interpolate_initial_rho(contour, z, rho)
Using a contour interpolate the initial rho
Parameters:
Name | Type | Description | Default |
---|---|---|---|
contour |
ContourGenerator
|
A contourpy object describing thee contour |
required |
z |
float
|
The z-position |
required |
rho |
float
|
The rho position |
required |
Returns:
Type | Description |
---|---|
float
|
the interpolated initial rho |