-
-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make docstrings consistent with numpydoc format #701
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,19 +88,19 @@ def calculate_power_law_density(velocities, velocity_0, rho_0, exponent): | |
Parameters | ||
---------- | ||
|
||
velocities : ~astropy.Quantity | ||
velocities : astropy.Quantity | ||
Array like velocity profile | ||
velocity_0 : ~astropy.Quantity | ||
velocity_0 : astropy.Quantity | ||
reference velocity | ||
rho_0 : ~astropy.Quantity | ||
rho_0 : astropy.Quantity | ||
reference density | ||
exponent : ~float | ||
exponent : float | ||
exponent used in the powerlaw | ||
|
||
Returns | ||
------- | ||
|
||
densities : ~astropy.Quantity | ||
densities : astropy.Quantity | ||
|
||
""" | ||
densities = rho_0 * np.power((velocities / velocity_0), exponent) | ||
|
@@ -115,17 +115,17 @@ def calculate_exponential_density(velocities, velocity_0, rho_0): | |
Parameters | ||
---------- | ||
|
||
velocities : ~astropy.Quantity | ||
velocities : astropy.Quantity | ||
Array like velocity profile | ||
velocity_0 : ~astropy.Quantity | ||
velocity_0 : astropy.Quantity | ||
reference velocity | ||
rho_0 : ~astropy.Quantity | ||
rho_0 : astropy.Quantity | ||
reference density | ||
|
||
Returns | ||
------- | ||
|
||
densities : ~astropy.Quantity | ||
densities : astropy.Quantity | ||
|
||
""" | ||
densities = rho_0 * np.exp(-(velocities / velocity_0)) | ||
|
@@ -137,19 +137,19 @@ def calculate_density_after_time(densities, time_0, time_explosion): | |
scale the density from an initial time of the model to the | ||
time of the explosion by ^-3 | ||
|
||
Parameters: | ||
Parameters | ||
----------- | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a small thing but keep the dashes matching in length the title (i.e. remove one here). There are other instances too. |
||
|
||
densities: ~astropy.units.Quantity | ||
densities: astropy.units.Quantity | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's keep the space before the |
||
densities | ||
|
||
time_0: ~astropy.units.Quantity | ||
time_0: astropy.units.Quantity | ||
time of the model | ||
|
||
time_explosion: ~astropy.units.Quantity | ||
time_explosion: astropy.units.Quantity | ||
time to be scaled to | ||
|
||
Returns: | ||
Returns | ||
-------- | ||
|
||
scaled_density | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ def _initialize_estimator_arrays(self, no_of_shells, tau_sobolev_shape): | |
Parameters | ||
---------- | ||
|
||
model: ~Radial1DModel | ||
model: Radial1DModel | ||
""" | ||
|
||
#Estimators | ||
|
@@ -272,16 +272,16 @@ def calculate_radiationfield_properties(self): | |
Parameters | ||
---------- | ||
|
||
nubar_estimator : ~np.ndarray (float) | ||
nubar_estimator : np.ndarray (float) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found out that PyCharm suggests |
||
|
||
j_estimator : ~np.ndarray (float) | ||
j_estimator : np.ndarray (float) | ||
|
||
Returns | ||
------- | ||
|
||
t_rad : ~astropy.units.Quantity (float) | ||
t_rad : astropy.units.Quantity (float) | ||
|
||
w : ~numpy.ndarray (float) | ||
w : numpy.ndarray (float) | ||
|
||
""" | ||
|
||
|
@@ -371,4 +371,4 @@ def from_config(cls, config): | |
enable_reflective_inner_boundary=config.montecarlo.enable_reflective_inner_boundary, | ||
inner_boundary_albedo=config.montecarlo.inner_boundary_albedo, | ||
line_interaction_type=config.plasma.line_interaction_type, | ||
distance=config.supernova.get('distance', None)) | ||
distance=config.supernova.get('distance', None)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,14 +40,14 @@ def create_packet_nus(self, T, no_of_packets): | |
|
||
Parameters | ||
---------- | ||
T : ~float | ||
T : float | ||
temperature | ||
no_of_packets: ~int | ||
no_of_packets: int | ||
|
||
Returns | ||
------- | ||
|
||
: ~numpy.ndarray | ||
: numpy.ndarray | ||
array of frequencies | ||
""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The indentation here is wrong, also no need for the leading |
||
|
||
|
@@ -75,4 +75,4 @@ def create_packets(self, T, no_of_packets): | |
mus = self.create_packet_mus(no_of_packets) | ||
energies = self.create_packet_energies(no_of_packets) | ||
|
||
return nus, mus, energies | ||
return nus, mus, energies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backticks are unnecessary. This applies to all other instances, I won't comment them separately.