singscat: module of single scattering tools

PyHdust singscat module: Single Scatering Dumbbell+disk model.

This release contains a simplified version of the one applied to Sigma Ori E in Carciofi+2013.

Conditions: - Calculations for a given observer position: observer at z = +infinity - Single scattering by electrons (Thomson) - Star is a point-source (*or at least, a spherical emitting source) - :math:` heta` is latitude. 0 = North pole; 180 = South pole. - \(\phi\) is longitude - Spherical coordinates seguence (\(r\), \(\phi\), :math:` heta`)

Remeber: - phi=0 is x direction (perpendicular to the observer) - (x, y) are not the same for (N, -E) astronomical images

license:GNU GPL v3.0 https://github.com/danmoser/pyhdust/blob/master/LICENSE
pyhdust.singscat.angQU(Q, U, filter=True)[source]

### Q,U angles ###

pyhdust.singscat.blobs_cicle(phi_ar, irad, Req=69550800000.0, rb=0.3333333333333333, db=2.0, bres=3, nb=800000000000.0)[source]

doc

pyhdust.singscat.blobs_coords(db=2, rb=0.3333333333333333, res=3, Req=1.0, phi0=0)[source]
Parameters:
  • db – distance from stellar center to blob center (Req)
  • rb – radius of the blob (sphere; Req)
  • reslinear resolution used in the Hypercube rejection method.
  • Req – stellar equatorial radius (in cm)
  • phi0 – central position of the blob (in rad)
pyhdust.singscat.blobsdisk_cicle(phi_ar, irad, Req=69550800000.0, rb=0.3333333333333333, db=2.0, bres=3, nb=800000000000.0, rd=0.3333333333333333, dd=2.0, dres=11, H=0.1, beta=0.0, nd=800000000000.0, overlap=False)[source]
Parameters:phi_ar – phi array (in rad; [0, 2pi))
pyhdust.singscat.blobsdiskmodel_geo(phi0, Req=69550800000.0, rb=0.3333333333333333, db=2.0, bres=3, nb=800000000000.0, rd=0.3333333333333333, dd=2.0, dres=11, H=0.1, beta=0.0, nd=800000000000.0, overlap=False)[source]

Doc

Parameters:overlap – disk and blob overlap each other? Default is False.

Warning: only \(\phi\) direction is checked (ie., coplanar overlap). :param beta: obliquity, in rad

pyhdust.singscat.blobsmodel_geo(phi0, Req=69550800000.0, rb=0.3333333333333333, db=2.0, bres=3, nb=800000000000.0)[source]

Doc

Parameters:overlap – disk and blob overlap each other? Default is False.

Warning: only \(\phi\) direction is checked (ie., coplanar overlap). :param beta: obliquity, in rad

pyhdust.singscat.calc_phase(MJDar, period, MJD0=0.0)[source]

Calc phase [0,1)

pyhdust.singscat.cil_slice_rej(res, dd, rd)[source]

NO z dimension

pyhdust.singscat.disk_coords(dd=2, rd=0.3333333333333333, res=11.0, Req=1.0, beta=0.0, phi0=0.0)[source]

Cilinder slice rejection method

Parameters:
  • beta – obliquity, in rad
  • phi0only effective when beta != 0.
pyhdust.singscat.loadpol(txt, old=False, p_sigP=0)[source]

Load polarization txt file.

Parameters:p_sigP – if > 0, filter values P/sigP
pyhdust.singscat.mod2obs(Qmod, Umod, Qis, Uis, ths)[source]

### MODEL TO OBSERV ###

Parameters:
  • ths – theta sky in rad
  • Qis – IS Q
  • Uis – IS U
pyhdust.singscat.obs2mod(Qobs, Uobs, Qis, Uis, ths)[source]

### MODEL TO OBSERV ###

Parameters:ths – theta sky
pyhdust.singscat.plot_QU_bc(x, y, Q, U, irad, Req)[source]

using baricenter

pyhdust.singscat.plot_QU_gd(x, y, Q, U, irad, Req)[source]

using griddata

pyhdust.singscat.plot_coords(xb1, yb1, zb1, Req, slim=3)[source]
Parameters:slim – Scale limit [-slim, slim]
pyhdust.singscat.sph_hyper_rej(res)[source]

Hypercube rejection method

pyhdust.singscat.stokes(r, phi, th, irad, dV, ne, Req, occult=True)[source]
Parameters:
  • irad – in rad
  • dV – in cm3

TODO: intensity calc.

output in fraction (multiple by 100 to have percentage