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

EEP plot caused exception when there stellar radius and/or temperature is missing #43

Open
orionlee opened this issue Aug 17, 2021 · 0 comments · May be fixed by #44
Open

EEP plot caused exception when there stellar radius and/or temperature is missing #43

orionlee opened this issue Aug 17, 2021 · 0 comments · May be fixed by #44

Comments

@orionlee
Copy link

Equivalent evolutionary phase plot caused exception when stellar radius / temperature is missing (from catalog data)

Periodogram plot... done.
Traceback (most recent call last):
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\dev\_juypter\LATTE\LATTE\__main__.py", line 556, in <module>
    utils.interact_LATTE(tic, indir, syspath, sectors_all, sectors, ra, dec, args)  # the argument of whether to shos the images or not
  File "C:\dev\_juypter\LATTE\LATTE\LATTEutils.py", line 840, in interact_LATTE
    brew.brew_LATTE(tic, indir, syspath, transit_list, simple, BLS, model, save, DV, sectors, sectors_all, alltime, allflux, allflux_err, all_md, alltimebinned, allfluxbinned, allx1, allx2, ally1, ally2, alltime12, allfbkg, start_sec, end_sec, in_sec, upper_axis_lim_final, lower_axis_lim_final, tessmag, teff, srad, ra, dec, -999, -999, args)
  File "C:\dev\_juypter\LATTE\LATTE\LATTEbrew.py", line 414, in brew_LATTE
    utils.eep_target(tic, indir, syspath, teff, srad, args)
  File "C:\dev\_juypter\LATTE\LATTE\LATTEutils.py", line 7058, in eep_target
    if rad < 3:
TypeError: '<' not supported between instances of 'NoneType' and 'int'
Evolutionary tracks plot... 

When the above exception is addressed (skipping the plot), another exception would generate during the data validation report pdf generation. The logic there assumes eep plot always exists.

 Start compiling the data validation report...
Traceback (most recent call last):
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\site-packages\reportlab\lib\utils.py", line 658, in open_for_read
    return open_for_read_by_name(name,mode)
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\site-packages\reportlab\lib\utils.py", line 602, in open_for_read_by_name
    return open(name,mode)
FileNotFoundError: [Errno 2] No such file or directory: 'dataLATTE/276793048/276793048_eep.png'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\site-packages\reportlab\lib\utils.py", line 661, in open_for_read
    return getBytesIO(datareader(name) if name[:5].lower()=='data:' else urlopen(name).read())
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\urllib\request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\urllib\request.py", line 510, in open
    req = Request(fullurl, data)
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\urllib\request.py", line 328, in __init__
    self.full_url = url
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\urllib\request.py", line 354, in full_url
    self._parse()
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\urllib\request.py", line 383, in _parse

    raise ValueError("unknown url type: %r" % self.full_url)
ValueError: unknown url type: 'dataLATTE/276793048/276793048_eep.png'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\dev\_juypter\LATTE\LATTE\__main__.py", line 556, in <module>
    utils.interact_LATTE(tic, indir, syspath, sectors_all, sectors, ra, dec, args)  # the argument of whether to shos the images or not
  File "C:\dev\_juypter\LATTE\LATTE\LATTEutils.py", line 840, in interact_LATTE
    brew.brew_LATTE(tic, indir, syspath, transit_list, simple, BLS, model, save, DV, sectors, sectors_all, alltime, allflux, allflux_err, all_md, alltimebinned, allfluxbinned, allx1, allx2, ally1, ally2, alltime12, allfbkg, start_sec, end_sec, in_sec, upper_axis_lim_final, lower_axis_lim_final, tessmag, teff, srad, ra, dec, -999, -999, args)
  File "C:\dev\_juypter\LATTE\LATTE\LATTEbrew.py", line 459, in brew_LATTE
    ldv.LATTE_DV(tic, indir, syspath, transit_list, sectors_all, target_ra, target_dec, tessmag, teff, srad, mstar, vmag, logg, mass_ast, radius_ast, logg_ast, numax, deltanu, plx, c_id, bls_stats1, bls_stats2, tpf_corrupt, astroquery_corrupt, FFI = False,  bls = True, model = model, mpi = args.mpi)

  File "C:\dev\_juypter\LATTE\LATTE\LATTE_DV.py", line 880, in LATTE_DV
    imp._restrictSize(width*0.55, width*0.55)
  File "C:\pkg\_winNonPortables\Anaconda3\envs\LATTE-dev\lib\site-packages\reportlab\platypus\flowables.py", line 473, in _restrictSize
    if self.drawWidth>aW+_FUZZ or self.drawHeight>aH+_FUZZ:
...
orionlee added a commit to orionlee/LATTE that referenced this issue Aug 17, 2021
@orionlee orionlee linked a pull request Aug 17, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant