dsavransky / EXOSIMS

Simulator for exoplanet direct imaging space missions
BSD 3-Clause "New" or "Revised" License
28 stars 42 forks source link

BrownCompleteness comp0=EVPOC is empty? #7

Closed rhondamorgan closed 8 years ago

rhondamorgan commented 8 years ago

I attempted to run end to end with today's newest release, including the updated BrownCompleteness.py.

Here is the Traceback:

IndexError Traceback (most recent call last)

in () ----> 1 sim = EXOSIMS.MissionSim.MissionSim(scriptfile) /Users/rhonda/exosims.2.0/EXOSIMS/EXOSIMS/MissionSim.pyc in **init**(self, scriptfile, **specs) 107 self.modules = {} 108 self.modules['SimulatedUniverse'] = get_module(specs['modules']\ --> 109 ['SimulatedUniverse'],'SimulatedUniverse')(**specs) 110 self.modules['Observatory'] = get_module(specs['modules']\ 111 ['Observatory'],'Observatory')(**specs) /Users/rhonda/exosims.2.0/EXOSIMS/EXOSIMS/SimulatedUniverse/KeplerLikeUniverse.py in **init**(self, **specs) 21 def **init**(self, *_specs): 22 ---> 23 SimulatedUniverse.**init**(self, *_specs) 24 25 def gen_planetary_systems(self,**specs): /Users/rhonda/exosims.2.0/EXOSIMS/EXOSIMS/Prototypes/SimulatedUniverse.py in **init**(self, eta, **specs) 87 88 # import TargetList class ---> 89 self.TargetList = get_module(specs['modules']['TargetList'],'TargetList')(**specs) 90 91 # bring inherited class objects to top level of Simulated Universe /Users/rhonda/exosims.2.0/EXOSIMS/EXOSIMS/Prototypes/TargetList.pyc in **init**(self, keepStarCatalog, minComp, **specs) 134 135 # now populate and filter the list --> 136 self.populate_target_list(**specs) 137 self.filter_target_list(**specs) 138 /Users/rhonda/exosims.2.0/EXOSIMS/EXOSIMS/Prototypes/TargetList.pyc in populate_target_list(self, **specs) 189 self.nan_filter() 190 # populate completeness values --> 191 self.comp0 = Comp.target_completeness(self) 192 # populate maximum integration time 193 self.maxintTime = OS.calc_maxintTime(self) /Users/rhonda/exosims.2.0/EXOSIMS/EXOSIMS/Completeness/BrownCompleteness.py in target_completeness(self, targlist) 108 dMag = dMag - 2.5*np.log10(L) 109 --> 110 comp0 = EVPOC(s.to('AU').value, dMag) 111 112 return comp0 /Users/rhonda/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy/lib/function_base.pyc in **call**(self, _args, *_kwargs) 1698 vargs.extend([kwargs[_n] for _n in names]) 1699 -> 1700 return self._vectorize_call(func=func, args=vargs) 1701 1702 def _get_ufunc_and_otypes(self, func, args):
dgarrett622 commented 8 years ago

This error occurs because the Star Catalog prototype is used. The Star Catalog prototype sets all stellar properties as empty arrays. The script which was used sets scaleOrbit=True which requires BrownCompleteness to use the stellar luminosity of the stars in the target list to calculate completeness. When these values are not present, this error is thrown.

To avoid this error, use any of the non-prototype Star Catalog modules (I used EXOCAT1).

When I used EXOCAT1, however, I get an empty Target List due to the int_cutoff_filter():

Traceback (most recent call last):

File "", line 1, in sim = MissionSim.MissionSim(scriptfile)

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\MissionSim.py", line 109, in init ['SimulatedUniverse'],'SimulatedUniverse')(**specs)

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\SimulatedUniverse\KeplerLikeUniverse.py", line 23, in init SimulatedUniverse.init(self, **specs)

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\Prototypes\SimulatedUniverse.py", line 89, in init self.TargetList = get_module(specs['modules']['TargetList'],'TargetList')(**specs)

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\Prototypes\TargetList.py", line 137, in init self.filter_target_list(**specs)

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\Prototypes\TargetList.py", line 226, in filter_target_list self.int_cutoff_filter()

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\Prototypes\TargetList.py", line 330, in int_cutoff_filter self.revise_lists(i)

File "C:\Users\Daniel\Documents\Cornell\Research\Python_Code_base\EXOSIMS\Prototypes\TargetList.py", line 389, in revise_lists assert self.nStars, "Target list is empty: nStars = %r"%self.nStars

AssertionError: Target list is empty: nStars = 0