discsim / frank

1D, super-resolution brightness profile reconstruction for interferometric sources
https://discsim.github.io/frank/
GNU Lesser General Public License v3.0
17 stars 5 forks source link

'frank.mplstyle' not found in the style library #162

Closed mtazzari closed 3 years ago

mtazzari commented 3 years ago

After running a frank fit (Mac OS, py 3.7, frank 1.0.1), I get this error. I'll check if I touched something in my environment since yesterday it was working. Maybe it's just a problem on my side, posting for reference. Will follow up here if I find anything.

Running Frankenstein on smooth.alma.cycle6.5.alma.cycle6.9.noisy.npz
  Saving parameters used to smooth.alma.cycle6.5.alma.cycle6.9.noisy_frank_used_pars.json
  Loading UVTable
  Determining disc geometry
    Using your provided geometry for deprojection
    Using: inc  = 29.00 deg,
           PA   = 90.00 deg,
           dRA  = 0.00e+00 mas,
           dDec = 0.00e+00 mas
  Fitting for brightness profile using FrankFitter
    Building visibility matrices M and j
    FrankFitter iteration 299[I 09:01:06.351 NotebookApp] Saving file at /CAS_CustomALMASimulator.ipynb
    FrankFitter iteration 2000
    Convergence criterion not met; fit stopped at max_iter specified in your parameter file, 2000
    Time taken to fit profile (with 4e+05 visibilities and 300 collocation points) 168.7 sec
  Saving fit results to smooth.alma.cycle6.5.alma.cycle6.9.noisy*
    Saving fit and residual UVTables. N.B.: These will be of comparable size to your input UVTable
  Plotting results
    Making quick figure

Traceback (most recent call last):
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/matplotlib/style/core.py", line 121, in use
    rc = rc_params_from_file(style, use_default_template=False)
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/matplotlib/__init__.py", line 883, in rc_params_from_file
    config_from_file = _rc_params_in_file(fname, fail_on_error=fail_on_error)
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/matplotlib/__init__.py", line 812, in _rc_params_in_file
    with _open_file_or_url(fname) as fd:
  File "/opt/anaconda3/envs/py37/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/matplotlib/__init__.py", line 790, in _open_file_or_url
    with open(fname, encoding=encoding) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/anaconda3/envs/py37/lib/python3.7/site-packages/frank/frank.mplstyle'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/anaconda3/envs/py37/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/anaconda3/envs/py37/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/frank/fit.py", line 769, in <module>
    main()
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/frank/fit.py", line 755, in main
    iteration_diagnostics
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/frank/fit.py", line 564, in output_results
    asinh_a=model['plotting']['asinh_a']
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/frank/make_figs.py", line 230, in make_quick_fig
    with frank_plotting_style_context_manager(force_style):
  File "/opt/anaconda3/envs/py37/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/matplotlib/style/core.py", line 160, in context
    use(style)
  File "/opt/anaconda3/envs/py37/lib/python3.7/site-packages/matplotlib/style/core.py", line 127, in use
    "available styles".format(style)) from err
OSError: '/opt/anaconda3/envs/py37/lib/python3.7/site-packages/frank/frank.mplstyle' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles
rbooth200 commented 3 years ago

frank.mplstyle is in the repository (frank/frank.mplstyle) so I think something has gone wrong with your install

jeffjennings commented 3 years ago

I agree with Richard, going to close this!