Skip to content

Failure mode in repetition analysis scripts #75

@MWSammons

Description

@MWSammons

Hi @cwjames1983 and @JordanHoffmann3 . Amanda Cook has been interested in using the zdm repo for computing some repetition statistics, and wants to rerun the analysis from your repeaters paper. Running through the scripts in the zDM/papers/Repeters/fit_repeating_distributions.py she's running into an issue with the parameters dictionary not containing Wbins parameter key and instead containing a WNbins key. Sifting through the functions and the traceback (which Amanda will include below) I had some trouble disentangling what the issue was. A couple of odd things were that the update_param function ends up doubly defined under the mydata class both here

zdm/zdm/data_class.py

Lines 94 to 102 in 63f79cf

def update_param(self, param:str, value):
""" Update the value of a single parameter
Args:
param (str): name of the parameter
value (?): value
"""
DC = self.params[param]
setattr(self[DC], param, value)

and here

zdm/zdm/parameters.py

Lines 418 to 427 in 63f79cf

def update_param(self, param:str, value):
# print(self.params)
DC = self.params[param]
setattr(self[DC], param, value)
# Special treatment
if DC == "cosmo" and param == "H0":
if self.cosmo.fix_Omega_b_h2:
self.cosmo.Omega_b = (
self.cosmo.Omega_b_h2 / (self.cosmo.H0 / 100.0) ** 2
)

and then the associated self.params dictionary seems to contain distinct keys from what was expected (WNbins rather than Wbins) from where I couldn't pin down. Seems like its pretty close to just working off the shelf and so any assistance in fixing this would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions