Skip to content

Commit

Permalink
WIP: Get filter/coating/phosphor defaults
Browse files Browse the repository at this point in the history
Signed-off-by: Brianna Major <[email protected]>
  • Loading branch information
Brianna Major committed Sep 6, 2024
1 parent 217de18 commit 654d61c
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions hexrdgui/absorption_correction_options_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,8 @@ def density_inputs(self):
}

def load_additional_materials(self):
# Use a high dmin since we do not care about the HKLs here.
dmin = _angstroms(2)
energy = _kev(HexrdConfig().beam_energy)
for key in self.material_selectors.keys():
materials = {}
file_name = f'{key}_materials.h5'
try:
with resource_loader.path(module, file_name) as file_path:
with h5py.File(file_path) as f:
mat_names = list(f.keys())

for name in mat_names:
materials[name] = Material(name, file_path,
dmin=dmin, kev=energy)
except:
# FIXME: Do we need this? Will there be additional files to load?
print(f'No such file: {file_name}')
finally:
self.additional_materials[key] = materials
# FIXME: Update to use defaults once they've been added to HEXRD
return

def update_gui(self):
# Filter info is set per detector
Expand Down

0 comments on commit 654d61c

Please sign in to comment.