Skip to content

Commit

Permalink
Using _diffrn_measured_fraction_theta_max for completeness
Browse files Browse the repository at this point in the history
  • Loading branch information
dkratzert committed Feb 1, 2024
1 parent f5dc9e7 commit b248932
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions finalcif/report/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def populate_main_table_values(main_table: Table, cif: CifContainer, column=1, r
row += 1
add_table_value(cif, main_table, '_exptl_crystal_F_000', row, column)
try:
completeness = f"{round(float(cif['_diffrn_measured_fraction_theta_full']) * 100, 1):.1f} %"
completeness = f"{round(float(cif['_diffrn_measured_fraction_theta_max']) * 100, 1):.1f} %"
except ValueError:
completeness = '?'
row += 1
Expand Down Expand Up @@ -486,9 +486,9 @@ def _goof(main_table: Table) -> None:

def _completeness(cif, main_table: Table) -> None:
p = paragraph(main_table)
theta_full = cif['_diffrn_reflns_theta_full']
if theta_full:
p.add_run(f'Completeness to \n{theta_symbol} = {theta_full}{degree_sign}')
theta_max = cif['_diffrn_reflns_theta_max']
if theta_max:
p.add_run(f'Completeness to \n{theta_symbol} = {theta_max}{degree_sign}')
else:
p.add_run('Completeness')

Expand Down
3 changes: 2 additions & 1 deletion finalcif/report/templated_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def get_radiation(cif: CifContainer) -> RichText:
@staticmethod
def get_completeness(cif: CifContainer) -> str:
try:
completeness = f"{float(cif['_diffrn_measured_fraction_theta_full']) * 100:.1f}{protected_space}%"
completeness = f"{float(cif['_diffrn_measured_fraction_theta_max']) * 100:.1f}{protected_space}%"
except ValueError:
completeness = '?'
return completeness
Expand Down Expand Up @@ -572,6 +572,7 @@ def _get_context(self, cif: CifContainer, options: Options, picfile: Path, tpl_d
'r_sigma' : this_or_quest(cif['_diffrn_reflns_av_unetI/netI']),
'completeness' : self.get_completeness(cif),
'theta_full' : cif['_diffrn_reflns_theta_full'],
'theta_max' : cif['_diffrn_reflns_theta_max'],
'data' : this_or_quest(cif['_refine_ls_number_reflns']),
'restraints' : this_or_quest(cif['_refine_ls_number_restraints']),
'parameters' : this_or_quest(cif['_refine_ls_number_parameters']),
Expand Down
Binary file modified finalcif/template/template1.docx
Binary file not shown.
Binary file modified finalcif/template/template_for_multitable.docx
Binary file not shown.
Binary file modified finalcif/template/template_text.docx
Binary file not shown.
Binary file modified finalcif/template/template_without_text.docx
Binary file not shown.

0 comments on commit b248932

Please sign in to comment.