# Freqle
Frequency from Black Holes is an asset containing some useful methods to simulate the emission of gravitational waves from ultralight boson clouds, around black holes in globular clusters.

**Installation:**
to install the package use

`pip install freqle`

# Usage
A brief guide about how to use the package

## **freqle.cluster(args)**
Is the main class in freqle. It contains the fundamental methods for running the simulations. 
- **Parameters :**
  - **obs_distance** : ***float, optional***
 Default is 200
 Distance in kpc between the observer and the cluster.
  - **cluster_eta :** ***float, optional***
 Default is 1.000
 Age of the cluster in years.
  - **Nbh :** ***int, optional***
  Default is 20.000
  Number of Black Holes simulated in the cluster.  
  - **mass_dis :** ***float, optional***
  Default is *Kroupa*
  Distribution used to randomly generate black holes masses.
  - **mass_range :** ***1D array, optional***
  Default is [5, 25]
  Range of black holes masses.
  - **spin_dis :** ***{'gauss', 'lin'}, optional***
  Default is *gauss*
  Distribution used to randomly generate spins that will be assigned to the black holes. The options are linear '_lin_' or gaussian '_gauss_'. In case _gauss_ is chosen an array of float is generated
`_ = numpy.arange(min_spin, max_spin, step)`
where step is given by 
`step = (max_spin - min_spin) / Nbh`.
_ is a numpy array of lenght Nbh. Spin values are extracted from _ using an array of probabilities p generated by
`gaussian = rnd.normal(spin_mean, self. spin_sigma, int(1e6)) `
`h, bin_edges = np.histogram(gaussian, bins = self.Nbh, density = True)`
`p = h * np.diff(bin_edges)`
than a simple random choice is used
`spins = numpy.random.choice(_, size = Nbh, p = p)`
  - **spin_range :** ***1D array, optional***
  Default is [0.2, 0.9]
  Range of black holes spins. _Note: Values above 0.6 should be avoided._
  - **spin_mean :** ***float, optional***
  _Only used if spin_dis == 'gauss'_. Default is 0.4
  Mean value of the gaussian distribution used to extract spin values.  
  - **spin_sigma :** ***float, optional***
  _Only used if spin_dis == 'gauss'_. Default is 0.2
  Sigma value of the gaussian distribution used to extract spin values.  
  - **n_mus :** ***float, optional***
  Default value is 300
  Number of boson masses sampled.
  - **mu_min :** ***float, optional***
  Default value is 2.15e-13
  Minimum value for the boson mass grid. _Default value is chosen to give the best accuracy (lower number of discarted points)_
  - **mu_max :** ***float, optional***
  Default value is 1.27e-12
  Maximum value for the boson mass grid. _Default value is chosen to give the best accuracy (lowest number of discarted points)_
  - **scale :** ***{'lin', 'log'}, optional***
  Default is 'lin'
  Scale used to sample the mass grid.
  - **verbose or v:** ***bool, optional***
  Default is _False_
  If _True_ informations are printed
  - ~~**multiple_runs :**~~
  _Not implemented yet_
  - ~~**Nrun :**~~
  _Not implemented yet_
