The Dedector Calibration File

The SAXS.calibration class and the saxsdog tool accepts a input file with the calibration data. This input file is written as a JSON file. This is a common syntax to express structured data as text. You might want to read a bit about it before moving on.

Calibration file Reference

The ‘*‘ signifies a required Field.

The SAXS configuration file specifies the parameters of a SAXS sensor calibration. It is written in the JSON format which governs the general syntax.

Type:

object

Contains:

Title, Geometry*, Masks*, Slices, Wavelength*, PolarizationCorrection, Directory*, Threads

Required:

True

JSON Path:

Example JSON:

{
  "Geometry": {
    "Tilt": {
      "TiltRotDeg": 0,
      "TiltAngleDeg": 0
    },
    "Imagesize": [
      1000,
      900
    ],
    "BeamCenter": [
      800.0,
      400.0
    ],
    "PixelSizeMicroM": [
      100.0
    ],
    "DedectorDistanceMM": 1000.0
  },
  "Wavelength": 1.54,
  "Directory": [],
  "Masks": []
}

Title

Type:

string

Required:

False

JSON Path:

Example JSON:

{"Title": ""}

Geometry

Type:

object

Contains:

Tilt*, BeamCenter*, DedectorDistanceMM*, PixelSizeMicroM*, Imagesize*

Required:

True

JSON Path:

Example JSON:

{
  "Geometry": {
    "Tilt": {
      "TiltRotDeg": 0,
      "TiltAngleDeg": 0
    },
    "Imagesize": [
      1000,
      900
    ],
    "BeamCenter": [
      800.0,
      400.0
    ],
    "PixelSizeMicroM": [
      100.0
    ],
    "DedectorDistanceMM": 1000.0
  }
}

Tilt

The sensor, usually is not perfectly perpenticular to the ray direction. The tilt angle can be specified by giving the following paramters.

Type:

object

Contains:

TiltRotDeg*, TiltAngleDeg*

Required:

True

JSON Path:

Example JSON:

{"Tilt": {"TiltRotDeg": 0,"TiltAngleDeg": 0}}

TiltRotDeg

This gives the angel of the tilt direction.

Type:

number in degree

Required:

True

Default:

0

JSON Path:

Example JSON:

{"TiltRotDeg": 0}

TiltAngleDeg

This gives the angle between the ray direction and the normal to the sensor plane.

Type:

number in degree

Required:

True

Default:

0

JSON Path:

Example JSON:

{"TiltAngleDeg": 0}

BeamCenter

Gives the beam center in pixel coorinates.

Type:

array(2) items: number

Required:

True

Default:

[800.0, 400.0]

JSON Path:

Example JSON:

{"BeamCenter": [800.0,400.0]}

DedectorDistanceMM

Distance between diffraction center and sensor.

Type:

number in Millimeters

Required:

True

Default:

1000.0

JSON Path:

Example JSON:

{"DedectorDistanceMM": 1000.0}

PixelSizeMicroM

The pixel size on the sensor.

Type:

array(2) items: number

Required:

True

Default:

[100.0]

JSON Path:

Example JSON:

{"PixelSizeMicroM": [100.0]}

Imagesize

Size of sensor image in pixel.

Type:

array(2) items: integer

Required:

True

Default:

[1000, 900]

JSON Path:

Example JSON:

{"Imagesize": [1000,900]}

Masks

Type:

array() items: {MaskFile, Oversampling, PixelPerRadialElement, Name, qStart, qStop}

Required:

True

JSON Path:

Example JSON:

{"Masks": []}

MaskFile

Path of Maskfile

Type:

string

Required:

True

Default:

AAA_integ.msk

JSON Path:

Example JSON:

{"MaskFile": "AAA_integ.msk"}

Oversampling

Oversampling factor for radial integration. The higher, the longer the setup but the higher the accuracy. More then 3 is probably overkill.

Type:

integer

Required:

True

Default:

3

JSON Path:

Example JSON:

{"Oversampling": 3}

PixelPerRadialElement

Expresses the width of a radial step in terms of pixels. ‘1’ means \(\delta R\approx 1\) PixelSizeMicroM.

Type:

number in Pixel

Required:

True

Default:

1

JSON Path:

Example JSON:

{"PixelPerRadialElement": 1}

Name

Name for mask configuration.

Type:

string

Required:

False

JSON Path:

Example JSON:

{"Name": ""}

qStart

Starting q-value for integral parameters.

Type:

number in nm^-1

Required:

True

Default:

0

JSON Path:

Example JSON:

{"qStart": 0}

qStop

Ending q-value for integral parameters.

Type:

number in nm^-1

Required:

True

Default:

0

JSON Path:

Example JSON:

{"qStop": 0}

Slices

Slices are designed to analyse GISAXS data.It allows you to specify slices along the sensor axis and get intensity along \(q_x\), \(q_z\) directions.

Type:

array() items: {Direction, Plane, CutPosition, CutMargin, IncidentAngle, MaskRef}

Required:

False

JSON Path:

Example JSON:

{"Slices": []}

Direction

‘x’ or ‘y’ direction in sensor pixel coordinates.

Type:

string

values:

[x, y]

Required:

True

Default:

x

JSON Path:

Example JSON:

{"Direction": "x"}

Plane

Whether the direction is in plane with scattering surface or vertical to it.

Type:

string

values:

[InPlane, Vertical]

Required:

True

Default:

InPlane

JSON Path:

Example JSON:

{"Plane": "InPlane"}

CutPosition

Cut position in pixel coordinates in the other coodinate then specified in ‘Direction’. Origin is top left Corner.

Type:

integer in Pixel

Required:

True

Default:

0

JSON Path:

Example JSON:

{"CutPosition": "0"}

CutMargin

Number of pixels left and right from cut to include into the average .

Type:

integer in Pixel

Required:

True

Default:

1

JSON Path:

Example JSON:

{"CutMargin": 1}

IncidentAngle

Angle of incidence in GISAXS setup.

Type:

number in degree

Required:

True

Default:

0

JSON Path:

Example JSON:

{"IncidentAngle": 0}

MaskRef

Chose which mask to use for the sclice. ‘-1’ means don’t use mask

Type:

integer

Required:

True

Default:

0

JSON Path:

Example JSON:

{"MaskRef": 0}

Wavelength

Refined wavelength.

Type:

number in Angstrom

Required:

True

Default:

1.54

JSON Path:

Example JSON:

{"Wavelength": 1.54}

PolarizationCorrection

The scattering direction id dependend on the light polarization. This may be acconted for with the polarization correction.

Type:

object

Contains:

Fraction*, Angle*

Required:

False

Default:

OrderedDict([(u’Fraction’, 0.95), (u’Angle’, 0)])

JSON Path:

Example JSON:

{"PolarizationCorrection": {"Angle": 0.0,"Fraction": 0.95}}

Fraction

Fraction of light polarized in the given (Angle) direction.

Type:

number

Required:

True

Default:

0.95

JSON Path:

Example JSON:

{"Fraction": 0.95}

Angle

Angle of the polarization plane.

Type:

number in degree

Required:

True

Default:

0.0

JSON Path:

Example JSON:

{"Angle": 0.0}

Directory

Directory to take into acount for processing images. Given as a list of subdirectories.

Type:

array() items: string

Required:

True

JSON Path:

Example JSON:

{"Directory": []}

Threads

Type:

integer

Required:

False

Default:

2

JSON Path:

Example JSON:

{"Threads": 2}