@@ -161,10 +161,13 @@ def calc(self, exposures, impact_funcs, hazard, save_mat=False):
161161 # Get damage functions for this hazard
162162 if_haz = INDICATOR_IF + hazard .tag .haz_type
163163 haz_imp = impact_funcs .get_func (hazard .tag .haz_type )
164- if if_haz not in exposures :
165- LOGGER .error ('Missing exposures column %s. No exposures with impact' \
166- + ' functions for peril %s.' , if_haz , hazard .tag .haz_type )
164+ if if_haz not in exposures and INDICATOR_IF not in exposures :
165+ LOGGER .error ('Missing exposures impact functions %s.' , INDICATOR_IF )
167166 raise ValueError
167+ elif if_haz not in exposures :
168+ LOGGER .info ('Missing exposures impact functions for hazard %s. ' + \
169+ 'Using impact functions in %s.' , if_haz , INDICATOR_IF )
170+ if_haz = INDICATOR_IF
168171
169172 # Check if deductible and cover should be applied
170173 insure_flag = False
@@ -203,7 +206,7 @@ def calc(self, exposures, impact_funcs, hazard, save_mat=False):
203206 self .imp_mat = self .imp_mat .tocsr ()
204207
205208 def plot_eai_exposure (self , mask = None , ignore_zero = True ,
206- pop_name = True , buffer_deg = 0.0 , extend = 'neither' ,
209+ pop_name = True , buffer = 0.0 , extend = 'neither' ,
207210 var_name = None , ** kwargs ):
208211 """Plot expected annual impact of each exposure.
209212
@@ -212,7 +215,7 @@ def plot_eai_exposure(self, mask=None, ignore_zero=True,
212215 ignore_zero (bool, optional): flag to indicate if zero and negative
213216 values are ignored in plot. Default: False
214217 pop_name (bool, optional): add names of the populated places
215- buffer_deg (float, optional): border to add to coordinates.
218+ buffer (float, optional): border to add to coordinates.
216219 Default: 1.0.
217220 extend (str, optional): extend border colorbar with arrows.
218221 [ 'neither' | 'both' | 'min' | 'max' ]
@@ -235,7 +238,7 @@ def plot_eai_exposure(self, mask=None, ignore_zero=True,
235238 kwargs ['reduce_C_function' ] = np .sum
236239 return u_plot .geo_bin_from_array (self .eai_exp [mask ][pos_vals ], \
237240 self .coord_exp [mask ][pos_vals ], var_name , title , pop_name , \
238- buffer_deg , extend , ** kwargs )
241+ buffer , extend , ** kwargs )
239242
240243 def _exp_impact (self , exp_iimp , exposures , hazard , imp_fun , insure_flag ):
241244 """Compute impact for inpute exposure indexes and impact function.
0 commit comments