The BraggEdges Handler Reference

class neutronbraggedge.braggedges_handler.braggedge_calculator.BraggEdgeCalculator(structure_name='FCC', lattice=None, number_of_set=10)[source]

This class calculates the h, k, and l values allowed for the given structure. The number of h,k,l set is by default set to 10 but can be changed

Args: structure_name: default ‘FCC’. Must be either [‘FCC’, ‘BCC’]

Parameters:
  • structure_name (Literal['BCC', 'FCC'])

  • lattice (float | None)

  • number_of_set (int)

hkl: list[list[int]]
bragg_edges: list[float]
d_spacing: list[float]
__init__(structure_name='FCC', lattice=None, number_of_set=10)[source]
Parameters:
  • structure_name (Literal['BCC', 'FCC'])

  • lattice (float | None)

  • number_of_set (int)

Return type:

None

lattice: float | None
property structure: Literal['BCC', 'FCC']
calculate_hkl()[source]
Return type:

None

calculate_bragg_edges()[source]

This calculate the d_spacing and bragg edges of the various h, k and l

Return type:

None

This file will handle work to retrieve the right h,k and l set of data for the various structures

class neutronbraggedge.braggedges_handler.structure_handler.BCCHandler(number_of_set)[source]

BCC type handler

For this type, h+k+l must be an even number

Parameters:

number_of_set (int)

__init__(number_of_set)[source]
Parameters:

number_of_set (int)

Return type:

None

hkl: list[list[int]]
number_of_set: int
calculate_hkl()[source]

calculate the list of hkl for BCC crystal structure

Return type:

None

class neutronbraggedge.braggedges_handler.structure_handler.FCCHandler(number_of_set)[source]

FCC type handler

For this type, h, k and l must have the same parity

Parameters:

number_of_set (int)

__init__(number_of_set)[source]
Parameters:

number_of_set (int)

Return type:

None

hkl: list[list[int]]
number_of_set: int
calculate_hkl()[source]

calculate the hkl allowed for a FCC crystal structure

Return type:

None

class neutronbraggedge.braggedges_handler.structure_handler.StructureHandler(structure, number_of_set=10)[source]

Various structure handler

Parameters:
  • structure (Literal['BCC', 'FCC'])

  • number_of_set (int)

__init__(structure, number_of_set=10)[source]
Parameters:
  • structure (Literal['BCC', 'FCC'])

  • number_of_set (int)

Return type:

None

structure: Literal['BCC', 'FCC']
number_of_set: int
hkl: list[list[int]]