mtazzari / galario

Gpu Accelerated Library for Analysing Radio Interferometer Observations
https://mtazzari.github.io/galario/
GNU Lesser General Public License v3.0
31 stars 15 forks source link

Update example online and make quickstart.py downloadable #112

Open mtazzari opened 6 years ago

mtazzari commented 6 years ago

Remove from GaussianProfile() the following lines altogether:

# convert to radians
sigma *= arcsec     # [rad] 
Rmin *= arcsec      # [rad]
dR *= arcsec        # [rad]

and move them to lnpostfn():

 # convert to rad
inc *= deg
PA *= deg
dRA *= arcsec
dDec *= arcsec
sigma *= arcsec     # [rad] 
Rmin *= arcsec      # [rad]
dR *= arcsec        # [rad]

 # compute the model brightness profile
f = GaussianProfile(f0, sigma, Rmin, dR, nR)
chi2 = chi2Profile(f, Rmin, dR, nxy, dxy, u, v, Re, Im, w, inc=inc, PA=PA, dRA=dRA, dDec=dDec)

and re-define:

def GaussianProfile(f0, sigma, Rmin, dR, nR):
    """ Gaussian brightness profile. """

    # radial grid
    R = np.linspace(Rmin, Rmin + dR*nR, nR, endpoint=False)

    return f0 * np.exp(-0.5*(R/sigma)**2)

Check the quickstart.py exactly reflects the online example.

mtazzari commented 6 years ago

Still to do