Skip to content

Commit

Permalink
rtfd upd only
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel M. Faes committed Aug 16, 2023
1 parent 6509c30 commit a9d63fc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 39 deletions.
1 change: 1 addition & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ build:
- pip install -r requirements.txt
- python3 setup.py install
# More at https://docs.readthedocs.io/en/stable/build-customization.html
# https://docs.readthedocs.io/en/stable/config-file/v2.html
# Warning: readthedocs still uses sphinx 1.8.6 as of Nov2022
2 changes: 1 addition & 1 deletion pyhdust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
except ImportError:
_warn.warn("# matplotlib and/or scipy module not installed!!")

__version__ = "1.5.9"
__version__ = "1.5.9-1"
__release__ = "Stable"
__author__ = "Daniel Moser"
__email__ = "dmfaes@gmail.com"
Expand Down
51 changes: 26 additions & 25 deletions pyhdust/beatlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,39 +328,40 @@ def createBAsed(
WARNING: The file names must be in this format:
`mod01_PLn3.5_sig0.00_h072_Rd000.0_Be_M14.60_ob1.45_H0.77_Z0.014_bE_Ell`
| The file structure:
| -n_quantities, n_lbd, n_models,
| -n_qt_vals1, n_qt_vals2, .. n_qt_valsn
| -quantities values = M, ob(W), Z, H, sig, Rd, h, *n*, cos(i).
| -(Unique) lbd array
| -Loop:
| * model values
| * model SED
The file structure:
| Definitions:
| -photospheric models: sig0 = 0.00
| -Parametric disk model default (`param` == True)
| -VDD-ST models: n excluded (alpha and R0 fixed. Confirm?)
| -The flux will be given in ergs/s/um2/um. If ignorelum==True, the usual
| F_lbda/F_bol unit will be given.
-n_quantities, n_lbd, n_models,
-n_qt_vals1, n_qt_vals2, .. n_qt_valsn
-quantities values = M, ob(W), Z, H, sig, Rd, h, *n*, cos(i).
-(Unique) lbd array
-Loop: model values
-Loop: model SED
Definitions:
- photospheric models: sig0 = 0.00
- Parametric disk model default (`param` == True)
- VDD-ST models: n excluded (alpha and R0 fixed. Confirm?)
- The flux will be given in ergs/s/um2/um. If ignorelum==True, the usual F_lbda/F_bol unit will be given.
Since the grid is not symmetric, there is no index to jump directly to the
desired model. So the suggestion is to use the index matrix, or read the
file line by line until find the model (if exists).
:Example:
def genxdr(xdrname='PL.xdr', param=True, pol=False):
fs2l = glob('fullsed/*.sed2')
print('# Using {0} as reference!'.format(fs2l[0]))
lbdarr = hdt.readfullsed2(fs2l[0])
lbdarr = lbdarr[0, :, 2]
nm, listpar = bat.fsedList(fs2l)
bat.createBAsed(fs2l, xdrname, lbdarr, param=param, savetxt=False,
pol=pol, saveextra=xdrname.replace('xdr', 'txt'))
return
genxdr(xdrname='Yudin_PL.xdr')
>>> def genxdr(xdrname='PL.xdr', param=True, pol=False):
>>> fs2l = glob('fullsed/*.sed2')
>>> print('# Using {0} as reference!'.format(fs2l[0]))
>>> lbdarr = hdt.readfullsed2(fs2l[0])
>>> lbdarr = lbdarr[0, :, 2]
>>> nm, listpar = bat.fsedList(fs2l)
>>> bat.createBAsed(fs2l, xdrname, lbdarr, param=param, savetxt=False,
>>> pol=pol, saveextra=xdrname.replace('xdr', 'txt'))
>>> return
>>>
>>> genxdr(xdrname='Yudin_PL.xdr')
"""
fsedlist.sort()
nq = 9
Expand Down
10 changes: 4 additions & 6 deletions pyhdust/rotstars.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,15 @@
import re as _re
import numpy as _np
from pyhdust import hdtpath as _hdtpath
from scipy.interpolate import griddata as _griddata
import pyhdust.phc as _phc
import pyhdust.spectools as _spt
import tarfile as _tarfile
import warnings as _warn

# try:
# import matplotlib.pyplot as _plt
# from scipy import interpolate as _interpolate
# except:
# print('# Warning! matplotlib and/or scipy module not installed!!!')
try:
from scipy.interpolate import griddata as _griddata
except ImportError:
print('# Warning! scipy module not installed!!!')

__author__ = "Daniel Moser"
__email__ = "dmfaes@gmail.com"
Expand Down
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def recfiles(chdir, path):

setup(
name="pyhdust",
version="1.5.9",
version="1.5.9-1",
description=(
"Analysis tools for multi-technique astronomical data and hdust models"
),
Expand All @@ -82,12 +82,7 @@ def recfiles(chdir, path):
# package_dir = {'../'},
zip_safe=False,
python_requires=">=3.6",
install_requires=[
"numpy>=1.18.2",
"six<=1.16.0",
"astropy<=5.1.1",
"python-dateutil<=2.8.1",
],
install_requires=["numpy>=1.18.2", "six<=1.16.0", "astropy<=5.1.1", "python-dateutil<=2.8.1"],
long_description=rd("README.rst"),
classifiers=[
# "Development Status :: 4 - Beta",
Expand Down

0 comments on commit a9d63fc

Please sign in to comment.