Skip to content

Commit

Permalink
add some doc
Browse files Browse the repository at this point in the history
  • Loading branch information
autocorr committed Feb 27, 2015
1 parent 549d951 commit 6505b33
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
4 changes: 4 additions & 0 deletions besl/bgps_fwhm.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def _get_props(self):
self.fwhm_sangle = self.fwhm_npix * self.pixel_size**2 # arcsec^2
self.fwhm_eqangle = np.sqrt(self.fwhm_sangle / np.pi) # arcsec
self.fwhm_flux = fwhmv.sum() / self.ppbeam # Jy
# Error in FWHM calculated from equation 8 in Rosolowsky et al. 2010
self.err_fwhm_flux = np.sqrt(np.sum(efwhmv**2) / self.ppbeam +
(0.06 * fwhmv.sum() / self.ppbeam)**2) # Jy

Expand All @@ -211,6 +212,9 @@ class FwhmDeconvolve(object):
theta_mb = 33 / 2.

def __init__(self, df=None):
"""
Calculate the deconvolved angular clump size by subtracting the beam.
"""
if df is None:
df = catalog.read_cat('bgps_v210_fwhm').set_index('v210cnum')
self.df = df
Expand Down
4 changes: 2 additions & 2 deletions besl/bplot/comp70.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import matplotlib.patheffects as PathEffects
from astropy.io import fits
from astropy.wcs import WCS
from besl import catalog
from besl import image
import catalog
import image


fdir = '/home/svobodb/research/temp/hg70_mips/'
Expand Down
31 changes: 31 additions & 0 deletions besl/bplot/sf_frac.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@


def get_data(clip_lon=True):
"""
Get combined dataframe of evolutionary and fwhm catalogs.
Parameters
----------
clip_lon : bool, Default True
Clip the dataframe to 10 < l < 65 degrees
Returns
-------
df : pd.DataFrame
"""
evo = catalog.read_cat('bgps_v210_evo').set_index('v210cnum')
fwhm = catalog.read_cat('bgps_v210_fwhm').set_index('v210cnum')
fwhm = fwhm.loc[:, 'npix':]
Expand All @@ -34,6 +46,25 @@ class ObsData(object):
winr = 25

def __init__(self, col, xlabel, with_dist=False, bool_proto=False):
"""
Star formation fraction for observable quantities without MC simulation.
Parameters
----------
col : str
Dataframe column name of property
xlabel : str
LaTeX string for xlabel of plot
with_dist : bool, Default False
Calculate values for the Distance Sample sub-set
bool_proto : bool, Default False
Use the boolean flags for protostellar activity
Attributes
----------
winr : number, Default 25
Window radius used in boxcar fraction calculation
"""
# params
self.col = col
self.xlabel = xlabel
Expand Down

0 comments on commit 6505b33

Please sign in to comment.