Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAS module no longer works as a standalone module (without comparing to observations) #40

Open
kevinmilner opened this issue Jan 25, 2022 · 3 comments

Comments

@kevinmilner
Copy link
Contributor

@fabiolsilva, I had been using the FAS module to compute FAS for simulations where I was not comparing with any observations. This commit to the FAS module now breaks it if observations aren't supplied:

646b247

I get this stack trace at first:

Traceback (most recent call last):
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/run_bbp.py", line 304, in <module>
    obj = item.instantiate(sim_id)
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/module.py", line 134, in instantiate
    return globals()[self.module_name](*self.module_args, **self.kw_args)
TypeError: __init__() missing 1 required positional argument: 'i_comparison_label'

I then tried changing the init method to default i_comparison_label to None, but get a new one:

Traceback (most recent call last):
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/run_bbp.py", line 305, in <module>
    obj.run()
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/fas.py", line 836, in run
    obs_dt = read_bbp_dt(input_obs_acc_file)
  File "/project/scec_608/kmilner/bbp/dev/bbp/comps/fas.py", line 339, in read_bbp_dt
    input_file = open(bbp_file)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/SLURM_3430421/tmpdata/11127002307386261/obs_seis_USC/USC.bbp'

I need this working soon, so I'll start throwing a bunch of if statements in there to isolate the observation code, but thought I would give you the chance to do it if you would prefer and can get to it in the next day or so. Thanks!

Kevin

@fabiolsilva
Copy link
Collaborator

@kevinmilner How do you call the FAS module? I think we will need a lot of if statements in order to make the run method work without observations. I'm inclined to have a separate run method that just does simulations. Would that work for you? Perhaps if i_comparison_label is None we can switch to the new run method.

Fabio

@kevinmilner
Copy link
Contributor Author

Thanks @fabiolsilva, that should work quite well! I call it on the command line via run_bby.py with an XML input file.

@fabiolsilva
Copy link
Collaborator

Commit e98d10b modified the FAS module to enable it to work with scenario simulations.

@fabiolsilva fabiolsilva added this to Backlog in Broadband Platform Release 22.4 via automation May 3, 2022
@fabiolsilva fabiolsilva moved this from Backlog to Planned in Broadband Platform Release 22.4 May 3, 2022
@fabiolsilva fabiolsilva moved this from Planned to In Progress in Broadband Platform Release 22.4 May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants