filament_profile¶
- fil_finder.filament_profile(skeleton, image, pixscale, max_dist=<Quantity 0.025 pc>, distance=<Quantity 250. pc>, num_avg=3, verbose=False, bright_unit='Jy km/s', noise=None, fit_profiles=True)[source]¶
Calculate radial profiles along the main extent of a skeleton (ie. the longest path). The skeleton must contain a single branch with no intersections.
- Parameters
- skeletonnp.ndarray
Boolean array containing the skeleton
- imagenp.ndarray
Image to compute the profiles from. Must match the spatial extent of the skeleton array.
- pixscale
Quantity
Angular size of a pixel in the image. Must have units equivalent to degrees.
- max_distastropy Quantity, optional
The angular or physical (when distance is given) extent to create the profile away from the centre skeleton pixel. The entire profile will be twice this value (for each side of the profile).
- distanceastropy Quantity, optional
Physical distance to the region in the image. If None is given, results will be in angular units based on the header.
- num_avgint, optional
Number of points before and after a pixel that is used when computing the normal vector. Using at least three points is recommended due to small pixel instabilities in the skeletons.
- verbosebool, optional
Enable plotting of the profile and the accompanying for each pixel in the skeleton.
- bright_unitstring or astropy Unit
Brightness unit of the image.
- noisenp.ndarray, optional
RMS array for the accompanying image. When provided, the errors are calculated along each of the profiles and used as weights in the fitting.
- fit_profilesbool, optional
When enabled, fits a Gaussian model to the profiles. Otherwise only the profiles are returned.
- Returns
- line_distanceslist
Distances along the profiles.
- line_profileslist
Radial profiles.
- profile_extentslist
Contains the pixel position of the start of the profile, the skeleton pixel, and the end of the profile.
- tabastropy QTable
Table of the fit results and errors with appropriate units.