@@ -1919,6 +1919,24 @@ def _populate_lc(self, dataset, ignore_effects=False, **kwargs):
19191919 abs_intensities *= extinct_factors
19201920 abs_normal_intensities *= extinct_factors
19211921
1922+ if not ignore_effects :
1923+ for feature in self .features :
1924+ if self .__class__ .__name__ == 'Star_roche_envelope_half' and self .ind_self != self .ind_self_vel :
1925+ # then this is the secondary half of a contact envelope
1926+ roche_coords_for_computations = np .array ([1.0 , 0.0 , 0.0 ]) - mesh .roche_coords_for_computations
1927+ else :
1928+ roche_coords_for_computations = self .mesh .roche_coords_for_computations
1929+ abs_normal_intensities , abs_intensities = feature .modify_intensities (abs_normal_intensities ,
1930+ abs_intensities ,
1931+ self .mesh .mus_for_computations ,
1932+ self .get_pblum_scale (dataset ),
1933+ extinct_factors ,
1934+ boost_factors ,
1935+ roche_coords_for_computations ,
1936+ s = self .polar_direction_xyz ,
1937+ t = self .time )
1938+
1939+
19221940 # Handle pblum - distance and l3 scaling happens when integrating (in observe)
19231941 # we need to scale each triangle so that the summed normal_intensities over the
19241942 # entire star is equivalent to pblum / 4pi
@@ -1933,21 +1951,6 @@ def _populate_lc(self, dataset, ignore_effects=False, **kwargs):
19331951 else :
19341952 raise NotImplementedError ("lc_method '{}' not recognized" .format (lc_method ))
19351953
1936- if not ignore_effects :
1937- for feature in self .features :
1938- if self .__class__ .__name__ == 'Star_roche_envelope_half' and self .ind_self != self .ind_self_vel :
1939- # then this is the secondary half of a contact envelope
1940- roche_coords_for_computations = np .array ([1.0 , 0.0 , 0.0 ]) - mesh .roche_coords_for_computations
1941- else :
1942- roche_coords_for_computations = self .mesh .roche_coords_for_computations
1943- abs_normal_intensities , normal_intensities , abs_intensities , intensities = feature .modify_intensities (abs_normal_intensities ,
1944- normal_intensities ,
1945- abs_intensities ,
1946- intensities ,
1947- roche_coords_for_computations ,
1948- s = self .polar_direction_xyz ,
1949- t = self .time )
1950-
19511954 # TODO: do we really need to store all of these if store_mesh==False?
19521955 # Can we optimize by only returning the essentials if we know we don't need them?
19531956 return {'abs_normal_intensities' : abs_normal_intensities ,
0 commit comments