Skip to content

surface_example.py resolution mismatch error #57

@AvidaanSrivastava

Description

@AvidaanSrivastava

Hello,

I'm trying to use this tool (for the first time!) to model surfaces and I'm running into the following error message:

Traceback (most recent call last):
  File "/Volumes/Avidaan Work/PhD projects/JWST/platon/examples/surface_example.py", line 39, in <module>
    wavelengths, depths, info_dict = calc.compute_depths(
                                     ^^^^^^^^^^^^^^^^^^^^
  File "/Volumes/Avidaan Work/PhD projects/JWST/platon/platon/eclipse_depth_calculator.py", line 194, in compute_depths
    stellar_fluxes_orig, _ = self.atm.get_stellar_spectrum(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Volumes/Avidaan Work/PhD projects/JWST/platon/platon/_atmosphere_solver.py", line 381, in get_stellar_spectrum
    raise ValueError("Stellar spectra has a different length ({}) than opacities ({})!  If you are using high resolution opacities, pass stellar_blackbody=True to compute_depths".format(len(spot_spectrum), len(lambdas)))

ValueError: Stellar spectra has a different length (13863) than opacities (100213)!  If you are using high resolution opacities, pass stellar_blackbody=True to compute_depths

This error occurs when the wavelengths, depths, info_dict = calc.compute_depths(...) function is run. I rechecked the installation and ran nosetests -v and everything checks out. I have not made any edits to the python script provided in "/examples/surface_example.py" so I am not sure why the vanilla example is not working. Are there any additional files I need to download that have somehow not been downloaded with the default installation? The other example codes seem to be working fine.

I would appreciate any help you can offer regarding this. Please let me know if you require any further information. Thank you.

Avidaan Srivastava

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions