def Av_from_prior(self, size, Av_prior, k='exponential'): #masses x_Av = np.linspace(0, 5, len(Av_prior)) self.Avs = a.inverse_transform_sampling(x_Av, a.pdf_fit(x_Av, Av_prior, k), size) self.Avs[self.Avs < 0] = 0.00
def distance_from_prior(self, size, distance_prior, k='exponential'): #masses x_distance = np.linspace(0, 5, len(distance_prior)) self.distances = a.inverse_transform_sampling( x_distance, a.pdf_fit(x_distance, distance_prior, k), size)
def mass_from_prior(self, size, mass_prior, k='gaussian'): #masses x_mass = np.linspace(0, 5, len(mass_prior)) self.masses = a.inverse_transform_sampling( x_mass, a.pdf_fit(x_mass, mass_prior, k), size)
def age_from_prior(self, size, age_prior, k='gaussian'): #masses x_age = np.linspace(0, 5, len(age_prior)) self.ages = a.inverse_transform_sampling( x_age, a.pdf_fit(x_age, age_prior, k), size)
def mass_from_prior(self, size, mass_prior, k='exponential'): #masses x_mass = np.linspace(0, 2.4, 10000) #len(mass_prior)) self.masses = a.inverse_transform_sampling( x_mass, a.pdf_fit(x_mass, mass_prior, k), size)