discminer 0.2.29__tar.gz → 0.3.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {discminer-0.2.29/discminer.egg-info → discminer-0.3.2}/PKG-INFO +19 -21
- {discminer-0.2.29 → discminer-0.3.2}/README.md +18 -20
- discminer-0.3.2/discminer/_version.py +1 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/cart.py +76 -2
- {discminer-0.2.29 → discminer-0.3.2}/discminer/core.py +3 -2
- {discminer-0.2.29 → discminer-0.3.2}/discminer/cube.py +171 -25
- discminer-0.3.2/discminer/dev_model.py +64 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/disc2d.py +62 -12
- {discminer-0.2.29 → discminer-0.3.2}/discminer/grid.py +37 -0
- discminer-0.3.2/discminer/mining/make_channels.py +138 -0
- discminer-0.3.2/discminer/mining/make_double_moments.py +89 -0
- discminer-0.3.2/discminer/mining/make_parfile.py +437 -0
- discminer-0.3.2/discminer/mining/make_single_moments.py +67 -0
- discminer-0.3.2/discminer/mining/plot_attributes_model.py +102 -0
- discminer-0.3.2/discminer/mining/plot_azimuthal_profiles.py +110 -0
- discminer-0.3.2/discminer/mining/plot_channels+peakint.py +182 -0
- discminer-0.3.2/discminer/mining/plot_gradient.py +234 -0
- discminer-0.3.2/discminer/mining/plot_isovelocities.py +239 -0
- discminer-0.3.2/discminer/mining/plot_moment+offset.py +160 -0
- discminer-0.3.2/discminer/mining/plot_moment+residuals.py +146 -0
- discminer-0.3.2/discminer/mining/plot_pv_diagram.py +216 -0
- discminer-0.3.2/discminer/mining/plot_radial_profiles+wedge.py +174 -0
- discminer-0.3.2/discminer/mining/plot_radial_profiles.py +429 -0
- discminer-0.3.2/discminer/mining/plot_residuals+all.py +193 -0
- discminer-0.3.2/discminer/mining/plot_residuals+deproj.py +231 -0
- discminer-0.3.2/discminer/mining/plot_spectra.py +323 -0
- discminer-0.3.2/discminer/mining/show_parcube.py +65 -0
- discminer-0.3.2/discminer/mining_control.py +506 -0
- discminer-0.3.2/discminer/mining_utils.py +830 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/model.py +90 -48
- {discminer-0.2.29 → discminer-0.3.2}/discminer/pick.py +50 -5
- {discminer-0.2.29 → discminer-0.3.2}/discminer/plottools.py +90 -41
- {discminer-0.2.29 → discminer-0.3.2}/discminer/rail.py +19 -13
- discminer-0.3.2/discminer/tools/fit_kernel.py +1209 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/tools/utils.py +217 -7
- {discminer-0.2.29 → discminer-0.3.2/discminer.egg-info}/PKG-INFO +19 -21
- {discminer-0.2.29 → discminer-0.3.2}/discminer.egg-info/SOURCES.txt +27 -0
- discminer-0.3.2/discminer.egg-info/entry_points.txt +3 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer.egg-info/requires.txt +3 -0
- discminer-0.3.2/example/README.rst +218 -0
- {discminer-0.2.29/template → discminer-0.3.2/example}/fit/fit_mc_mwc480.py +6 -6
- {discminer-0.2.29/template → discminer-0.3.2/example}/prepare_data.py +0 -2
- {discminer-0.2.29 → discminer-0.3.2}/setup.py +10 -2
- {discminer-0.2.29 → discminer-0.3.2}/template/README.rst +2 -0
- discminer-0.3.2/template/download_MAPS.sh +121 -0
- discminer-0.3.2/template/fit/fit_mc_mwc480.py +185 -0
- discminer-0.3.2/template/log_pars_mwc480_12co_0p2_maps_cube_256walkers_10000steps.txt +5 -0
- discminer-0.3.2/template/prepare_data.py +19 -0
- discminer-0.2.29/discminer/_version.py +0 -1
- discminer-0.2.29/discminer/tools/fit_kernel.py +0 -571
- {discminer-0.2.29 → discminer-0.3.2}/.gitignore +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/LICENSE +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/MANIFEST.in +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/README.md +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/make_channels.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/make_double_moments.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/make_parfile.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/make_single_moments.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_attributes_model.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_azimuthal_profiles.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_channel+peakint.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_channel+residuals.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_gradient.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_lineprofiles.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_moment+3d.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_moment+comparison.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_moment+offset.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_moment+residuals.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_peak_residuals.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_radial_profiles.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_residuals+all.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_residuals+deproj.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_residuals+filaments.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/plot_velocity_components.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/show_parcube.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/_mining/utils.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/__init__.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/constants.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/button_box.png +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/button_cursor.jpeg +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/button_path.png +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/button_return.png +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/button_surface.png +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/button_trash.jpg +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/icons/logo.txt +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/testyapf.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/tools/discminer.mplstyle +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer/units.py +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer.egg-info/dependency_links.txt +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/discminer.egg-info/top_level.txt +0 -0
- {discminer-0.2.29/template → discminer-0.3.2/example}/download_MAPS.sh +0 -0
- {discminer-0.2.29/template → discminer-0.3.2/example}/log_pars_mwc480_12co_0p2_maps_cube_256walkers_10000steps.txt +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/pyproject.toml +0 -0
- {discminer-0.2.29 → discminer-0.3.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: discminer
|
3
|
-
Version: 0.2
|
3
|
+
Version: 0.3.2
|
4
4
|
Summary: Python package for parametric modelling of intensity channel maps from gas discs
|
5
5
|
Home-page: https://github.com/andizq/discminer
|
6
6
|
Author: Andres F. Izquierdo
|
@@ -22,7 +22,7 @@ Description: <p align="center">
|
|
22
22
|
|
23
23
|
|
24
24
|
<div align="center">
|
25
|
-
Welcome to the discminer repository! Looking for quick examples and tutorials? Check out the
|
25
|
+
Welcome to the discminer repository! Looking for quick examples and tutorials? Check out the <mark>example/</mark> folder.
|
26
26
|
<br />
|
27
27
|
<a href="https://github.com/andizq/discminer/issues/new?assignees=&labels=bug&title=bug%3A+">Report a Bug</a>
|
28
28
|
·
|
@@ -32,12 +32,12 @@ Description: <p align="center">
|
|
32
32
|
</div>
|
33
33
|
|
34
34
|
- Model channel maps from molecular line emission of discs by fitting intensity **and** rotation velocity
|
35
|
-
-
|
35
|
+
- Analyse the disc's dynamics by modelling Keplerian motion, and optionally pressure support + self-gravity
|
36
|
+
- Investigate the disc vertical structure by modelling front and back side emission surfaces
|
36
37
|
- Compute moment maps that accurately capture complex line profile morphologies
|
37
|
-
- Extract rotation curves, radial and meridional velocities, intensity and line width profiles
|
38
|
-
-
|
39
|
-
-
|
40
|
-
- Non-axisymmetric models are possible; all attributes can be described as a function of $R,\phi,z$ disc coords
|
38
|
+
- Extract rotation curves, radial and meridional velocities, intensity, and line width profiles
|
39
|
+
- Identify velocity and intensity substructures, and examine their coherence and degree of localisation
|
40
|
+
- Support non-axisymmetric models; all attributes can be described in three-dimensional coordinates
|
41
41
|
|
42
42
|
|
43
43
|
<img
|
@@ -47,32 +47,32 @@ Description: <p align="center">
|
|
47
47
|
|
48
48
|
## Mining tools
|
49
49
|
|
50
|
-
Discminer offers a wide range of analysis and visualisation tools to fully explore the physical and dynamical structure of
|
50
|
+
Discminer offers a wide range of analysis and visualisation tools to fully explore the physical and dynamical structure of discs.
|
51
51
|
|
52
52
|
|
53
53
|
### cube
|
54
54
|
|
55
55
|
- Compute moment maps that accurately capture complex line profile morphologies.
|
56
56
|
- Output moment maps include **peak intensity**, **line width**, **line slope**, and **centroid velocity**.
|
57
|
-
- Easily clip, downsample, and convert to brightness temperature units.
|
57
|
+
- Easily clip, downsample, and convert data to brightness temperature units.
|
58
58
|
- Quickly visualise model versus data channels and interactively extract spectra.
|
59
59
|
|
60
60
|
### rail
|
61
61
|
|
62
|
-
- Extract azimuthal and radial profiles of intensity, line width and velocity from moment maps.
|
63
|
-
- Compute rotation curves and decompose disc
|
64
|
-
-
|
62
|
+
- Extract azimuthal and radial profiles of intensity, line width, and velocity from moment maps.
|
63
|
+
- Compute rotation curves and decompose disc velocities into their three-dimensional components.
|
64
|
+
- Identify large-scale structures and quantify their pitch angle, width, extent, and degree of coherence.
|
65
65
|
|
66
66
|
### pick
|
67
67
|
|
68
|
-
- Identify small-scale
|
68
|
+
- Identify small-scale perturbations and estimate their degree of localisation.
|
69
69
|
|
70
70
|
### plottools
|
71
71
|
|
72
|
-
- Customise intensity channels and residual maps
|
73
|
-
- Use sky or disc projections interchangeably for
|
74
|
-
- Easily overlay
|
75
|
-
-
|
72
|
+
- Customise intensity channels, moments, and residual maps.
|
73
|
+
- Use sky or disc projections interchangeably for improved visualisation of features.
|
74
|
+
- Easily overlay disc geometry (considering orientation and vertical structure) onto any observable product.
|
75
|
+
- Load in 1D profiles or 2D maps from external data e.g. to highlight the presence of dust substructures.
|
76
76
|
|
77
77
|
|
78
78
|
## Installation
|
@@ -89,7 +89,6 @@ Description: <p align="center">
|
|
89
89
|
|
90
90
|
#### Optional dependencies
|
91
91
|
|
92
|
-
- [termtables](https://pypi.org/project/termtables)
|
93
92
|
- [termplotlib](https://pypi.org/project/termplotlib)
|
94
93
|
- [FilFinder](https://pypi.org/project/fil-finder)
|
95
94
|
- [schwimmbad](https://pypi.org/project/schwimmbad)
|
@@ -97,10 +96,9 @@ Description: <p align="center">
|
|
97
96
|
|
98
97
|
## How to use
|
99
98
|
|
100
|
-
|
101
|
-
functionality of the code in the `./template` folder of this repository.
|
99
|
+
You can find practical examples demonstrating the main functionality of the code in the `./example` folder of this repository.
|
102
100
|
|
103
|
-
To run the examples on your local machine
|
101
|
+
To run the examples on your local machine, clone this repository and follow the instructions provided in the README file,
|
104
102
|
|
105
103
|
```bash
|
106
104
|
git clone https://github.com/andizq/discminer.git
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
|
14
14
|
<div align="center">
|
15
|
-
Welcome to the discminer repository! Looking for quick examples and tutorials? Check out the
|
15
|
+
Welcome to the discminer repository! Looking for quick examples and tutorials? Check out the <mark>example/</mark> folder.
|
16
16
|
<br />
|
17
17
|
<a href="https://github.com/andizq/discminer/issues/new?assignees=&labels=bug&title=bug%3A+">Report a Bug</a>
|
18
18
|
·
|
@@ -22,12 +22,12 @@
|
|
22
22
|
</div>
|
23
23
|
|
24
24
|
- Model channel maps from molecular line emission of discs by fitting intensity **and** rotation velocity
|
25
|
-
-
|
25
|
+
- Analyse the disc's dynamics by modelling Keplerian motion, and optionally pressure support + self-gravity
|
26
|
+
- Investigate the disc vertical structure by modelling front and back side emission surfaces
|
26
27
|
- Compute moment maps that accurately capture complex line profile morphologies
|
27
|
-
- Extract rotation curves, radial and meridional velocities, intensity and line width profiles
|
28
|
-
-
|
29
|
-
-
|
30
|
-
- Non-axisymmetric models are possible; all attributes can be described as a function of $R,\phi,z$ disc coords
|
28
|
+
- Extract rotation curves, radial and meridional velocities, intensity, and line width profiles
|
29
|
+
- Identify velocity and intensity substructures, and examine their coherence and degree of localisation
|
30
|
+
- Support non-axisymmetric models; all attributes can be described in three-dimensional coordinates
|
31
31
|
|
32
32
|
|
33
33
|
<img
|
@@ -37,32 +37,32 @@
|
|
37
37
|
|
38
38
|
## Mining tools
|
39
39
|
|
40
|
-
Discminer offers a wide range of analysis and visualisation tools to fully explore the physical and dynamical structure of
|
40
|
+
Discminer offers a wide range of analysis and visualisation tools to fully explore the physical and dynamical structure of discs.
|
41
41
|
|
42
42
|
|
43
43
|
### cube
|
44
44
|
|
45
45
|
- Compute moment maps that accurately capture complex line profile morphologies.
|
46
46
|
- Output moment maps include **peak intensity**, **line width**, **line slope**, and **centroid velocity**.
|
47
|
-
- Easily clip, downsample, and convert to brightness temperature units.
|
47
|
+
- Easily clip, downsample, and convert data to brightness temperature units.
|
48
48
|
- Quickly visualise model versus data channels and interactively extract spectra.
|
49
49
|
|
50
50
|
### rail
|
51
51
|
|
52
|
-
- Extract azimuthal and radial profiles of intensity, line width and velocity from moment maps.
|
53
|
-
- Compute rotation curves and decompose disc
|
54
|
-
-
|
52
|
+
- Extract azimuthal and radial profiles of intensity, line width, and velocity from moment maps.
|
53
|
+
- Compute rotation curves and decompose disc velocities into their three-dimensional components.
|
54
|
+
- Identify large-scale structures and quantify their pitch angle, width, extent, and degree of coherence.
|
55
55
|
|
56
56
|
### pick
|
57
57
|
|
58
|
-
- Identify small-scale
|
58
|
+
- Identify small-scale perturbations and estimate their degree of localisation.
|
59
59
|
|
60
60
|
### plottools
|
61
61
|
|
62
|
-
- Customise intensity channels and residual maps
|
63
|
-
- Use sky or disc projections interchangeably for
|
64
|
-
- Easily overlay
|
65
|
-
-
|
62
|
+
- Customise intensity channels, moments, and residual maps.
|
63
|
+
- Use sky or disc projections interchangeably for improved visualisation of features.
|
64
|
+
- Easily overlay disc geometry (considering orientation and vertical structure) onto any observable product.
|
65
|
+
- Load in 1D profiles or 2D maps from external data e.g. to highlight the presence of dust substructures.
|
66
66
|
|
67
67
|
|
68
68
|
## Installation
|
@@ -79,7 +79,6 @@ pip install -U discminer
|
|
79
79
|
|
80
80
|
#### Optional dependencies
|
81
81
|
|
82
|
-
- [termtables](https://pypi.org/project/termtables)
|
83
82
|
- [termplotlib](https://pypi.org/project/termplotlib)
|
84
83
|
- [FilFinder](https://pypi.org/project/fil-finder)
|
85
84
|
- [schwimmbad](https://pypi.org/project/schwimmbad)
|
@@ -87,10 +86,9 @@ pip install -U discminer
|
|
87
86
|
|
88
87
|
## How to use
|
89
88
|
|
90
|
-
|
91
|
-
functionality of the code in the `./template` folder of this repository.
|
89
|
+
You can find practical examples demonstrating the main functionality of the code in the `./example` folder of this repository.
|
92
90
|
|
93
|
-
To run the examples on your local machine
|
91
|
+
To run the examples on your local machine, clone this repository and follow the instructions provided in the README file,
|
94
92
|
|
95
93
|
```bash
|
96
94
|
git clone https://github.com/andizq/discminer.git
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.3.2"
|
@@ -2,6 +2,8 @@ import numpy as np
|
|
2
2
|
from astropy import units as u
|
3
3
|
from astropy import constants as ct
|
4
4
|
from scipy.interpolate import interp1d, RectBivariateSpline
|
5
|
+
|
6
|
+
from .grid import GridTools
|
5
7
|
from .tools.utils import hypot_func
|
6
8
|
|
7
9
|
au_to_m = u.au.to('m')
|
@@ -9,6 +11,12 @@ au_to_m = u.au.to('m')
|
|
9
11
|
#*******************
|
10
12
|
#VELOCITY FUNCTIONS
|
11
13
|
#*******************
|
14
|
+
def keplerian(coord, Mstar=1.0, vel_sign=1, vsys=0):
|
15
|
+
Mstar *= u.M_sun.to('kg')
|
16
|
+
if 'R' not in coord.keys(): R = hypot_func(coord['x'], coord['y'])
|
17
|
+
else: R = coord['R']
|
18
|
+
return vel_sign*np.sqrt(ct.G.value*Mstar/R) * 1e-3
|
19
|
+
|
12
20
|
def keplerian_vertical(coord, Mstar=1.0, vel_sign=1, vsys=0):
|
13
21
|
Mstar *= u.M_sun.to('kg')
|
14
22
|
if 'R' not in coord.keys():
|
@@ -21,25 +29,33 @@ def keplerian_vertical(coord, Mstar=1.0, vel_sign=1, vsys=0):
|
|
21
29
|
r = coord['r']
|
22
30
|
return vel_sign*np.sqrt(ct.G.value*Mstar/r**3)*R * 1e-3
|
23
31
|
|
24
|
-
def velocity_hydro2d(coord, func_interp_R=None, func_interp_phi=None, Mstar=1.0, vel_sign=1, vsys=0, **dummies):
|
32
|
+
def velocity_hydro2d(coord, func_interp_R=None, func_interp_phi=None, Mstar=1.0, vel_sign=1, vsys=0, phip=0.0, **dummies):
|
25
33
|
Mstar *= u.M_sun.to('kg')
|
26
|
-
y = coord['x'] #
|
34
|
+
y = coord['x'] #90 deg shift so that phip=0 aligns with disc major axis
|
27
35
|
x = coord['y']
|
28
36
|
R = coord['R']
|
29
37
|
|
38
|
+
if phip != 0.0:
|
39
|
+
phip = np.radians(phip)
|
40
|
+
x, y = GridTools._rotate_sky_plane(x, y, phip)
|
41
|
+
|
30
42
|
if 'r' not in coord.keys():
|
31
43
|
r = hypot_func(R, coord['z'])
|
44
|
+
|
32
45
|
else:
|
33
46
|
r = coord['r']
|
34
47
|
|
35
48
|
if func_interp_R is None and func_interp_phi is not None:
|
36
49
|
vphi = func_interp_phi(x,y, grid=False)
|
37
50
|
vR = np.zeros_like(vphi)
|
51
|
+
|
38
52
|
elif func_interp_R is not None and func_interp_phi is None:
|
39
53
|
vR = func_interp_R(x,y, grid=False)
|
40
54
|
vphi = np.zeros_like(vR)
|
55
|
+
|
41
56
|
elif func_interp_R is None and func_interp_phi is None:
|
42
57
|
return [0, 0, 0]
|
58
|
+
|
43
59
|
else:
|
44
60
|
vR = func_interp_R(x,y, grid=False)
|
45
61
|
vphi = func_interp_phi(x,y, grid=False)
|
@@ -136,6 +152,64 @@ def intensity_powerlaw_rbreak_nosurf(coord, I0=1.0, p0=-2.5, p1=-1.5,
|
|
136
152
|
Ieff_rout = np.where(R<=Rout, Ieff, 0.0)
|
137
153
|
return Ieff_rout
|
138
154
|
|
155
|
+
def intensity_powerlaw_rout_hydro(coord, I0=30.0, R0=100, p=-0.4, z0=100, q=0.3, Rout=500, func_interp_sigma=None, phip=0.0, weight=1.0):
|
156
|
+
|
157
|
+
y = coord['x']
|
158
|
+
x = coord['y']
|
159
|
+
|
160
|
+
if phip != 0.0:
|
161
|
+
phip = np.radians(phip)
|
162
|
+
x, y = GridTools._rotate_sky_plane(x, y, phip)
|
163
|
+
|
164
|
+
if 'R' not in coord.keys():
|
165
|
+
R = hypot_func(coord['x'], coord['y'])
|
166
|
+
else:
|
167
|
+
R = coord['R']
|
168
|
+
|
169
|
+
if func_interp_sigma is None:
|
170
|
+
sigma = np.zeros_like(R)
|
171
|
+
else:
|
172
|
+
sigma = func_interp_sigma(x,y, grid=False)
|
173
|
+
|
174
|
+
z = coord['z']
|
175
|
+
R0*=au_to_m
|
176
|
+
z0*=au_to_m
|
177
|
+
Rout*=au_to_m
|
178
|
+
A = I0*R0**-p*z0**-q
|
179
|
+
Ieff = np.where(R<=Rout, A*R**p*np.abs(z)**q, 0.0) * sigma**weight
|
180
|
+
|
181
|
+
return Ieff
|
182
|
+
|
183
|
+
def intensity_powerlaw_rbreak_hydro(coord, I0=30.0, p0=-0.4, p1=-0.4, z0=100, q=0.3, Rbreak=20, Rout=500, p=0, func_interp_sigma=None, phip=0.0, weight=1.0):
|
184
|
+
|
185
|
+
y = coord['x']
|
186
|
+
x = coord['y']
|
187
|
+
|
188
|
+
if phip != 0.0:
|
189
|
+
phip = np.radians(phip)
|
190
|
+
x, y = GridTools._rotate_sky_plane(x, y, phip)
|
191
|
+
|
192
|
+
if 'R' not in coord.keys():
|
193
|
+
R = hypot_func(coord['x'], coord['y'])
|
194
|
+
else:
|
195
|
+
R = coord['R']
|
196
|
+
|
197
|
+
if func_interp_sigma is None:
|
198
|
+
sigma = np.zeros_like(R)
|
199
|
+
else:
|
200
|
+
sigma = func_interp_sigma(x,y, grid=False)
|
201
|
+
|
202
|
+
z = coord['z']
|
203
|
+
z0*=au_to_m
|
204
|
+
Rout*=au_to_m
|
205
|
+
Rbreak*=au_to_m
|
206
|
+
A = I0*Rbreak**-p0*z0**-q
|
207
|
+
B = I0*Rbreak**-p1*z0**-q
|
208
|
+
Ieff = np.where(R<=Rbreak, A*R**p0*np.abs(z)**q, B*R**p1*np.abs(z)**q)
|
209
|
+
ind = R>Rout
|
210
|
+
Ieff[ind] = 0.0
|
211
|
+
return Ieff
|
212
|
+
|
139
213
|
#***********
|
140
214
|
#LINE WIDTH
|
141
215
|
#***********
|
@@ -15,7 +15,7 @@ import warnings
|
|
15
15
|
import json
|
16
16
|
|
17
17
|
class Data(Cube):
|
18
|
-
def __init__(self, filename, dpc, twodim=False):
|
18
|
+
def __init__(self, filename, dpc, twodim=False, disc=None, mol='12co', kind=['mask']):
|
19
19
|
"""
|
20
20
|
Initialise Data object. Inherits `~discminer.disc2d.Cube` properties and methods.
|
21
21
|
|
@@ -95,13 +95,14 @@ class Data(Cube):
|
|
95
95
|
raise InputError(cube_vel,
|
96
96
|
'The input datacube is not valid. Only the following spectral_cube instances are supported: SpectralCube, VaryingResolutionSpectralCube.')
|
97
97
|
|
98
|
-
super().__init__(data, header, vchannels, dpc, beam=beam, filename=filename)
|
98
|
+
super().__init__(data, header, vchannels, dpc, beam=beam, filename=filename, disc=disc, mol=mol, kind=kind)
|
99
99
|
|
100
100
|
def _init_cube(self):
|
101
101
|
super().__init__(
|
102
102
|
self.data,
|
103
103
|
self.header,
|
104
104
|
self.vchannels,
|
105
|
+
self.dpc,
|
105
106
|
beam = self.beam,
|
106
107
|
filename = self.filename
|
107
108
|
)
|