-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
Fixes numpydoc for util #969
Conversation
tardis/util/base.py
Outdated
@@ -72,6 +72,20 @@ def __str__(self): | |||
)) | |||
|
|||
def int_to_roman(i): | |||
""" | |||
Convert an integer i into its roman numeral representation. |
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.
probably leave out the i - because that parameter is already described below.
tardis/util/base.py
Outdated
------- | ||
: str | ||
Returns roman numeral representation of i in str format. | ||
|
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.
is this newline standard for numpydoc
@kowal180 the tests are failing on github. Do they run locally? The last merge into the master branch passed the test, so I'm not sure what the problem is. |
@@ -307,6 +439,17 @@ def quantity_linspace(start, stop, num, **kwargs): | |||
|
|||
|
|||
def convert_abundances_format(fname, delimiter='\s+'): | |||
""" |
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.
lookup docstring indentation
@@ -253,6 +354,20 @@ def parse_quantity(quantity_string): | |||
|
|||
|
|||
def element_symbol2atomic_number(element_string): | |||
""" | |||
Takes an element symbol and returns its corresponding atomic number | |||
Parameters |
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.
newline missing
moved to top |
tardis/util/base.py
Outdated
wavelength_unit: float, optional(default = u.angstrom) | ||
Dictates units used for calculating wavelength. | ||
flux_column: int, optional(default = 1) | ||
#UNSURE |
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.
#UNSURE | |
column index in which the flux is stored |
tardis/util/base.py
Outdated
Parameters | ||
---------- | ||
nu: int | ||
Frequency of a wave of light |
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.
Frequency of a wave of light | |
Frequency of light |
tardis/util/base.py
Outdated
|
||
.. math:: | ||
I(\\nu, T) = \\frac{2h\\nu^3}{c^2}\frac{1}{e^{h\\nu \\beta_\\textrm{rad}} - 1} | ||
|
||
Parameters | ||
---------- | ||
nu: int |
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.
I think that is a float
tardis/util/base.py
Outdated
---------- | ||
nu: int | ||
Frequency of a wave of light | ||
T: int |
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.
float
tardis/util/base.py
Outdated
Parameters | ||
---------- | ||
species_string: str | ||
String containing element symbol and number of electrons missing |
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.
String containing element symbol and number of electrons missing | |
String containing species symbol (e.g. Si II, Fe III) |
tardis/util/base.py
Outdated
String containing element symbol and number of electrons missing | ||
|
||
Returns | ||
---------- |
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.
make the minuses just as long as the Returns or Raises
tardis/util/base.py
Outdated
|
||
Returns | ||
------- | ||
:str |
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.
space missing
tardis/util/base.py
Outdated
|
||
Returns | ||
------- | ||
:int |
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.
space missing
tardis/util/base.py
Outdated
Parameters | ||
---------- | ||
radial1d_mdl | ||
fname |
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.
file name for the synpp yaml
tardis/util/base.py
Outdated
nu: int | ||
Frequency of a wave of light | ||
T: int | ||
nu: flot |
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.
float
not flot
😉
@@ -121,6 +162,16 @@ def calculate_luminosity(spec_fname, distance, wavelength_column=0, wavelength_u | |||
|
|||
|
|||
def create_synpp_yaml(radial1d_mdl, fname, shell_no=0, lines_db=None): | |||
""" | |||
#UNSURE | |||
Parameters |
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.
create a yaml file that is readable from syn++
* Fixes numpydoc for until.py * Address comments by @wkerzendorf * Continued working on numpydoc_fix * Continuation of work on numpydoc_fix * Adressing fixes proposed by @wkerzendorf * Small fixes to numpydoc format of base.py
In the process of fixing all the numpydoc problems in the util package. This is in relation to #680.
int_to_roman
roman_to_int
calculate_luminosity
create_synpp_yaml
intensity_black_body
species_tuple_to_string
species_string_to_tuple
parse_quantity
element_symbol2atomic_number
atomic_number2element_symbol
reformat_element_symbol
quantity_linspace
convert_abundances_format