Giter Site home page Giter Site logo

Comments (6)

ChrisDelaX avatar ChrisDelaX commented on July 18, 2024

from exosims.

dsavransky avatar dsavransky commented on July 18, 2024

@ChrisDelaX can you also update documentation/install.rst (optional packages section) with info on Frorecaster support? Thanks.

from exosims.

ChrisDelaX avatar ChrisDelaX commented on July 18, 2024

@mb2448: Apparently the Forecaster files have not been updated since 10 months on their original GitHub page. I have tried to pull them again, and replace the existing files. Everything worked well on my side. But I noticed that the "save as" option was not giving me the right func.py file in the first place, and I needed to copy-paste it into a .py file.
Anyway, to avoid complicated manipulations, I have simplified the Forecaster.py module of EXOSIMS and pushed another update. Now, user needs to download only the fitting_parameters.h5 file from the FORECASTER GitHub repository at https://github.com/chenjj2/forecaster and add it to the PlanetPhysicalModel directory. No need to rename it.

Let me know if that works on your side. Make sure the fitting_parameters.h5 file weights ~98MB.

@dsavransky: Documentation (install requirements) updated.

from exosims.

mb2448 avatar mb2448 commented on July 18, 2024

Nope. I did a clean pull, added the forecaster fitting_parameters.h5 (98 Mb) to the directory:

EXOSIMS/PlanetPhysicalModel

and tried to execute the same script, getting what looks like the same error (copied below). I don't quite understand why; the forecaster module is clearly on the path...


Error: No module on paths: "EXOSIMS.PlanetPhysicalModel.Forecaster", "EXOSIMS.Prototypes.Forecaster".
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-3-41ff9bcee02a> in <module>()
      2 scriptfile = os.path.join(EXOSIMS.__path__[0],'Scripts','sampleScript_coron.json')
      3 import EXOSIMS.MissionSim
----> 4 sim = EXOSIMS.MissionSim.MissionSim(scriptfile)

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/MissionSim.pyc in __init__(self, scriptfile, **specs)
    109         self.modules = {}
    110         self.modules['SimulatedUniverse'] = get_module(specs['modules']\
--> 111                 ['SimulatedUniverse'],'SimulatedUniverse')(**specs)
    112         self.modules['Observatory'] = get_module(specs['modules']\
    113                 ['Observatory'],'Observatory')(**specs)

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/SimulatedUniverse/KnownRVPlanetsUniverse.pyc in __init__(self, **specs)
     18     def __init__(self,**specs):
     19 
---> 20         SimulatedUniverse.__init__(self, **specs)
     21 
     22     def gen_physical_properties(self, missionStart=60634., **specs):

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/Prototypes/SimulatedUniverse.pyc in __init__(self, **specs)
     90 
     91         # import TargetList class
---> 92         self.TargetList = get_module(specs['modules']['TargetList'],'TargetList')(**specs)
     93 
     94         # bring inherited class objects to top level of Simulated Universe

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/TargetList/KnownRVPlanetsTargetList.pyc in __init__(self, **specs)
     45                              'rv': 'st_radv'}
     46 
---> 47         TargetList.__init__(self, **specs)
     48 
     49     def populate_target_list(self, **specs):

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/Prototypes/TargetList.pyc in __init__(self, keepStarCatalog, minComp, **specs)
     78         self.ZodiacalLight = get_module(specs['modules']['ZodiacalLight'],'ZodiacalLight')(**specs)
     79         self.PostProcessing = get_module(specs['modules']['PostProcessing'],'PostProcessing')(**specs)
---> 80         self.Completeness = get_module(specs['modules']['Completeness'],'Completeness')(**specs)
     81 
     82         # bring inherited class objects to top level of Simulated Universe

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/Prototypes/Completeness.pyc in __init__(self, **specs)
     20     def __init__(self, **specs):
     21         # import PlanetPopulation class
---> 22         Pop = get_module(specs['modules']['PlanetPopulation'],'PlanetPopulation')(**specs)
     23         self.PlanetPopulation = Pop # planet population object class
     24         self.PlanetPhysicalModel = Pop.PlanetPhysicalModel

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/PlanetPopulation/KnownRVPlanets.pyc in __init__(self, smaknee, esigma, rvplanetfilepath, **specs)
     57         specs['smaknee'] = float(smaknee)
     58         specs['esigma'] = float(esigma)
---> 59         KeplerLike1.__init__(self, **specs)
     60 
     61         #default file is ipac_2016-05-15

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/PlanetPopulation/KeplerLike1.pyc in __init__(self, smaknee, esigma, **specs)
     46         specs['prange'] = [0.083,0.882]
     47         specs['Rprange'] = [1,22.6]
---> 48         PlanetPopulation.__init__(self, **specs)
     49 
     50         assert (smaknee >= self.arange[0].to('AU').value) and \

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/Prototypes/PlanetPopulation.pyc in __init__(self, arange, erange, Irange, Orange, wrange, prange, Rprange, Mprange, scaleOrbits, constrainOrbits, eta, **specs)
     95         # import PlanetPhysicalModel
     96         self.PlanetPhysicalModel = get_module(specs['modules']['PlanetPhysicalModel'], \
---> 97                 'PlanetPhysicalModel')(**specs)
     98 
     99     def checkranges(self, var, name):

/Users/mbottom/Desktop/Other_projects/EXOSIMS/code/EXOSIMS/util/get_module.pyc in get_module(name, folder)
    232         full_module = get_module_in_package(name, folder)
    233         if not full_module:
--> 234             raise ValueError('Could not import module "%s" (path issue?).' % name)
    235         source = full_module.__name__
    236         note = 'prototype' if 'EXOSIMS.Prototypes' in full_module.__name__ else 'specific'

ValueError: Could not import module "Forecaster" (path issue?).

from exosims.

mb2448 avatar mb2448 commented on July 18, 2024

Ok, I figured it out---it was failing on the

90 full_module = importlib.import_module(name)

because it could not import h5py, which does not seem to be listed as a requirement. The "try" statement hides the actual error.

from exosims.

dsavransky avatar dsavransky commented on July 18, 2024

Install documentation updated with details on forecaster and h5py dependency.

from exosims.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.