frbs / pygedm Goto Github PK
View Code? Open in Web Editor NEWPython bindings for YMW16, NE2001 and YT2020 electron density models
Home Page: https://pygedm.readthedocs.io/
Python bindings for YMW16, NE2001 and YT2020 electron density models
Home Page: https://pygedm.readthedocs.io/
In the functions dist_to_dm
and dm_to_dist
the argument mode='igm' gives a KeyError. Here is the in- and output from the ipython console:
In [1]: import pyymw16
In [2]: pyymw16.dist_to_dm(204.0, -6.5, 200, mode='igm')
DM_IGM: 32.73 DM_Host: 0.00 z: 0.046 DM: 284.78 log(tau_sc): -3.311
Traceback (most recent call last):
File "<ipython-input-3-40aea8aade18>", line 1, in <module>
pyymw16.dist_to_dm(204.0, -6.5, 200, mode='igm')
File "/homes/myname/.local/lib/python3.6/site-packages/pyymw16/__init__.py", line 72, in dist_to_dm
dm = r['DM'] * u.pc / u.cm**3
KeyError: 'DM'
It seems that from the C++ function dmdtau
only the first two returns are put in a dictionary while the rest is printed.
In [1]: import ymw16
In [2]: import os
In [3]: from pkg_resources import resource_filename
In [4]: DATAPATH = os.path.dirname(resource_filename("pyymw16", "spiral.txt"))
In [5]: gl, gb, dist, dm_host, ndir, mode_id, vbs, txt = 204.0, -6.5, 200, 0, 2, -1, 0, ''
In [6]: ymw16.dmdtau(gl, gb, dist, dm_host, ndir, mode_id, vbs, DATAPATH, txt)
Out[6]: {'DM_Gal': 252.05010986328125, 'DM_MC': 0.0} DM_IGM: 32.73 DM_Host: 0.00 z: 0.046 DM: 284.78 log(tau_sc): -3.311
I am looking to reproduce the distance computation from the example found in the README:
# calculate distance for a given sky position and DM
dist, tau_sc = pygedm.dm_to_dist(123.4, 4.0, 200)
I've got a list of positions (l
, b
) and DMs dm
for which I wish to derive the distance for every corresponding combination:
distances = []
idx = 0
for dm_value in dm:
distance, tau_sc = pygedm.dm_to_dist(l[idx], b[idx], dm_value)
distances.append(str(distance))
idx += 1
print(l[0], b[0], dm[0], distances[0])
print(l[1], b[1], dm[1], distances[1])
print(l[2], b[2], dm[2], distances[2])
However, it seems that I always get 25000.0 pc
, even though l[i]
, b[i]
and dm[i]
vary:
356.64 -20.02 790.3 25000.0 pc
260.07 -38.35 350.0 25000.0 pc
274.72 -33.3 1187.0 25000.0 pc
What could be the cause of this issue?
Full script here in case I'm missing anything obvious.
Also, I believe there is a typo here (other than (float)
), which may introduce a lot of confusion and give incorrect results (though definitely not the cause of the aforementioned issue):
Args:
l (float): galactic latitude in degrees
b (float): galactic longitude in degrees
dm (floa): Dispersion measure
l should be considered galactic longitude and b should be considered galactic latitude. I'm not sure if the code also needs adjustments or if it's solely a docstring typo, but it's definitely something to be looked at and corrected.
Thanks a lot in advance!
Found by Daniela Breitman:
I think there might be a little naming issue in your example:
In the README.md file, in the usage section:
dist, tau_sc = pygedm.dm_to_dist(123.4, 4.0, 200)
I think that what you call tau_sc (scattering time) here is actually just SMtau because in the NE2001_wrapper.py (https://github.com/telegraphic/pygedm/blob/2c2fc05a357607457cbf72469990d059eda2df79/pygedm/ne2001_wrapper.py)
It states that the output is:
Returns
-------
limit : string(len=1)
sm : float
smtau : float
smtheta : float
smiso : float
So tau_sc in this example is indeed smtau.
It would be kind to users if you could change the variable name to something more appropriate, because I thought that example line really returned the scattering time at first.
hi,
I encountered an error using the (pygedm.dist_to_dm method)
eg: DM, tau_sc = pygedm.dist_to_dm(204.0, -6.5, 2000.0, method='ne2001')
Segment fault: Spit nuclei
Hi,
FYI, when trying to build the pygedm_app using app/Dockerfile I get an error because the line:
COPY ./assets/* /app/assets
needs a terminating slash
Thanks,
Simon
I wish to use the values for the Scattering Measure (sm) and/or Pulse Broadening Time (tausis) but I have not been able to get them from pygedm. Any examples of how to extract this values from pygedm.
Thank you
I am currently attempting to install pygedm on a miniconda environment with all of the prereqs installed. f2c
has been installed via mamba install -c conda-forge f2c
. GCC is currently at version 11.2.0.
Here is the output of the pip install:
(pulsar) [jglaser@node03 opt]$ pip install git+https://github.com/telegraphic/pygedm.git
Collecting git+https://github.com/telegraphic/pygedm.git
Cloning https://github.com/telegraphic/pygedm.git to /tmp/pip-req-build-4n5yak21
Running command git clone -q https://github.com/telegraphic/pygedm.git /tmp/pip-req-build-4n5yak21
Requirement already satisfied: pybind11>=2.2 in ./miniconda/2021.07.21/envs/pulsar/lib/python3.8/site-packages (from pygedm==3.3.0) (2.7.0)
Requirement already satisfied: astropy in ./miniconda/2021.07.21/envs/pulsar/lib/python3.8/site-packages (from pygedm==3.3.0) (4.3.post1)
Requirement already satisfied: numpy>=1.17 in /home/jglaser/.local/lib/python3.8/site-packages (from astropy->pygedm==3.3.0) (1.21.1)
Requirement already satisfied: pyerfa>=1.7.3 in ./miniconda/2021.07.21/envs/pulsar/lib/python3.8/site-packages (from astropy->pygedm==3.3.0) (2.0.0)
Building wheels for collected packages: pygedm
Building wheel for pygedm (setup.py) ... error
ERROR: Command errored out with exit status 1:
[.....]
In file included from ne21c/main.cpp:12:
ne21c/ne21.c:13:10: fatal error: f2c.h: No such file or directory
13 | #include "f2c.h"
| ^~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
For some reason, it seems to be unable to find the f2c.h directory, despite it being installed. Any ideas on how to remedy this?
For reference, here is the current pip list
for the environment:
Package Version
---------------------- -------------------
acor 1.1.1
algopy 0.5.7
appdirs 1.4.4
argon2-cffi 20.1.0
arviz 0.11.2
astropy 4.3.post1
async-generator 1.10
attrs 21.2.0
backcall 0.2.0
bleach 4.0.0
bokeh 2.3.3
Bottleneck 1.3.2
cached-property 1.5.2
certifi 2021.5.30
cffi 1.14.0
cftime 1.5.0
chardet 3.0.4
click 8.0.1
cloudpickle 1.6.0
conda-package-handling 1.7.0
corner 2.2.1
cryptography 2.9.2
cycler 0.10.0
Cython 0.29.24
cytoolz 0.11.0
dask 2021.7.2
decorator 5.0.9
defusedxml 0.7.1
distributed 2021.7.2
docutils 0.17.1
emcee 3.1.0
enterprise-extensions 2.2.0
enterprise-pulsar 3.1.0
entrypoints 0.3
ephem 4.0.0.2
Flask 1.1.2
fonttools 4.25.0
fsspec 2021.7.0
future 0.18.2
gmpy2 2.0.8
h5py 3.2.1
healpy 1.15.0
HeapDict 1.0.1
idna 2.9
imagecodecs 2021.6.8
imageio 2.9.0
importlib-metadata 3.10.0
iniconfig 1.1.1
ipykernel 5.3.4
ipympl 0.7.0
ipython 7.26.0
ipython-genutils 0.2.0
ipywidgets 7.6.3
itsdangerous 2.0.1
jedi 0.18.0
Jinja2 3.0.1
joblib 1.0.1
jplephem 2.6
jsonschema 3.2.0
jupyter-client 6.1.12
jupyter-core 4.7.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.0
kiwisolver 1.3.1
libstempo 2.4.2
llvmlite 0.36.0
locket 0.2.1
MarkupSafe 2.0.1
marshmallow 3.12.2
matplotlib 3.4.2
matplotlib-inline 0.1.2
mistune 0.8.4
mkl-fft 1.3.0
mkl-random 1.2.2
mkl-service 2.4.0
mock 4.0.3
more-itertools 8.8.0
mpi4py 3.1.0
mpmath 1.2.1
msgpack 1.0.2
munkres 1.1.4
nbclient 0.5.3
nbconvert 6.1.0
nbformat 5.1.3
nest-asyncio 1.5.1
netCDF4 1.5.7
networkx 2.6.2
nose 1.3.7
notebook 6.4.2
numba 0.53.1
numexpr 2.7.3
numpy 1.21.1
oauthlib 3.1.1
olefile 0.46
packaging 21.0
pandas 1.3.1
pandocfilters 1.4.3
parso 0.8.2
partd 1.2.0
patsy 0.5.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.3.1
pint-pulsar 0.8.2
pip 20.0.2
pluggy 0.13.1
PRESTO 0.99
prometheus-client 0.11.0
prompt-toolkit 3.0.17
psutil 5.8.0
ptmcmcsampler 2.0.0
ptyprocess 0.7.0
PulsePortraiture 0.0
py 1.10.0
pyarrow 5.0.0
pybind11 2.7.0
pycosat 0.6.3
pycparser 2.20
pyerfa 2.0.0
Pygments 2.9.0
pymultinest 2.11
pyOpenSSL 19.1.0
pyparsing 2.4.7
PyQt5 5.12.3
PyQt5-sip 4.19.18
PyQtChart 5.12
PyQtWebEngine 5.12.1
pyrsistent 0.17.3
PySocks 1.7.1
pytest 6.2.4
pytest-runner 5.3.1
python-dateutil 2.8.2
pytz 2021.1
PyWavelets 1.1.1
PyYAML 5.4.1
pyzmq 22.2.1
quilt 2.9.15
requests 2.23.0
requests-oauthlib 1.3.0
ruamel-yaml-conda 0.15.100
ruamel.yaml 0.16.12
ruamel.yaml.clib 0.2.2
scikit-image 0.18.1
scikit-learn 0.24.2
scikit-sparse 0.4.5
scipy 1.7.1
seaborn 0.11.2
Send2Trash 1.5.0
setuptools 46.4.0.post20200518
six 1.14.0
sortedcontainers 2.4.0
statsmodels 0.12.2
sympy 1.8
tables 3.6.1
tblib 1.7.0
tempo-utils 0.0
terminado 0.9.4
testpath 0.5.0
threadpoolctl 2.2.0
tifffile 2021.7.2
toml 0.10.2
toolz 0.11.1
tornado 6.1
tqdm 4.46.0
traitlets 5.0.5
typing-extensions 3.10.0.0
uncertainties 3.1.6
urllib3 1.25.8
vincent 0.4.4
Wand 0.6.5
wcwidth 0.2.5
webencodings 0.5.1
Werkzeug 1.0.1
wheel 0.34.2
widgetsnbextension 3.5.1
xarray 0.19.0
xlrd 2.0.1
yt 3.6.1
zict 2.0.0
zipp 3.5.0
In PR #17 @InesPM added a frequency parameter to the methods, so that the scattering timescales are computed at a given frequency.
I have added some simple tests in test_tau_sc.py. Need to confirm the output values are indeed as expected.
dm, tau_sc_1GHz = pygedm.dm_to_dist(0, 0, 1000, method='ymw16', nu=1.0)
dm, tau_sc_100MHz = pygedm.dm_to_dist(0, 0, 1000, method='ymw16', nu=0.1)
assert np.isclose(tau_sc_1GHz.value, 0.31681767)
assert np.isclose(tau_sc_100MHz.value, 3168.17671061)
assert np.isclose((0.1/1.0)**(-4) * tau_sc_1GHz.value, tau_sc_100MHz.value)
dm, tau_sc_1GHz = pygedm.dm_to_dist(0, 0, 1000, method='ne2001', nu=1.0)
dm, tau_sc_100MHz = pygedm.dm_to_dist(0, 0, 1000, method='ne2001', nu=0.1)
assert np.isclose(tau_sc_1GHz.value, 198.57881596)
assert np.isclose(tau_sc_100MHz.value, 4988074.33385041)
@InesPM could you please take a look and confirm if these values are as expected? (Or do you have other tests that would be more appropriate)?
the generate-wheels.yml github action is missing something:
In [2]: import pygedm
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-2bed23ea31d2> in <module>
----> 1 import pygedm
~/mpy3/envs/p38/lib/python3.8/site-packages/pygedm/__init__.py in <module>
6 __version__ = '0.0.1 - manual install'
7
----> 8 from .pygedm import dm_to_dist, dist_to_dm, calculate_electron_density_lbr, calculate_electron_density_xyz, \
9 calculate_halo_dm, generate_healpix_dm_map, convert_lbr_to_xyz
~/mpy3/envs/p38/lib/python3.8/site-packages/pygedm/pygedm.py in <module>
22 """
23 from . import ymw16_wrapper
---> 24 from . import ne2001_wrapper
25 from . import yt2020
26 from . import healpix_utils
~/mpy3/envs/p38/lib/python3.8/site-packages/pygedm/ne2001_wrapper.py in <module>
19 from functools import wraps
20 from astropy import units as u
---> 21 import ne21c
22
23 DATA_PATH = os.path.dirname(os.path.abspath(__file__))
ImportError: /home/dancpr/mpy3/envs/p38/lib/python3.8/site-packages/pygedm.libs/libf2c-e943422c.so.0.23: undefined symbol: MAIN__
In [3]: cd /home/dancpr/mpy3/envs/p38/lib/python3.8/site-packages/pygedm.libs/
/home/dancpr/mpy3/envs/p38/lib/python3.8/site-packages/pygedm.libs
That symbol is in the ne21c main.cpp
, unsure what libf2c thinks its doing... This one might take a while to debug. For now I have deleted from PyPi the broken wheels.
After installation, I get an error when trying to import:
File "scat_scint.py", line 11, in <module>
import pygedm
File "/home/ines/anaconda3/lib/python3.7/site-packages/pygedm/__init__.py", line 7, in <module>
from . import ne2001_wrapper
File "/home/ines/anaconda3/lib/python3.7/site-packages/pygedm/ne2001_wrapper.py", line 5, in <module>
from . import dmdsm # f2py FORTRAN object
ImportError: cannot import name 'dmdsm' from 'pygedm' (/home/ines/anaconda3/lib/python3.7/site-packages/pygedm/__init__.py)
When I install pyymw16 from pip I am given the following error. Although it does install correctly, it gives the illusion the process has failed.
ModuleNotFoundError: No module named 'pybind11'
----------------------------------------
Failed building wheel for pyymw16
Running setup.py clean for pyymw16
Failed to build pyymw16
Installing collected packages: pybind11, pyymw16
Running setup.py install for pyymw16 ... done
Successfully installed pybind11-2.2.4 pyymw16-2.0.4
I believe this is due to import pybind11
in the setup.py file. It searches for a module within pyymw16 called pybind11 and when it can't find one it raises this error it then installs pybind11.
After trying to install fruitbat on Ubuntu 20.04.3 LTS using:
pip3 install fruitbat
I get the following error, which appears to be related to pygedm
(hence why I open the issue in this repository):
Collecting fruitbat
Using cached fruitbat-2.0.1-py3-none-any.whl (4.9 MB)
Requirement already satisfied: pandas>=0.22.0 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (1.4.2)
Requirement already satisfied: numpy>=1.16.0 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (1.21.4)
Requirement already satisfied: scipy>=1.0.0 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (1.7.3)
Requirement already satisfied: astropy>=3.2.3 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (5.0.4)
Collecting pygedm>=3.2.3
Using cached pygedm-3.3.0.tar.gz (57 kB)
Requirement already satisfied: e13tools>=0.5.3 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (0.9.6)
Requirement already satisfied: h5py>=2.10.0 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (3.6.0)
Requirement already satisfied: matplotlib>=2.2.4 in /usr/local/lib/python3.8/dist-packages (from fruitbat) (3.4.3)
Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.8/dist-packages (from pandas>=0.22.0->fruitbat) (2022.1)
Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.8/dist-packages (from pandas>=0.22.0->fruitbat) (2.8.2)
Requirement already satisfied: packaging>=19.0 in /usr/local/lib/python3.8/dist-packages (from astropy>=3.2.3->fruitbat) (21.3)
Requirement already satisfied: PyYAML>=3.13 in /usr/lib/python3/dist-packages (from astropy>=3.2.3->fruitbat) (5.3.1)
Requirement already satisfied: pyerfa>=2.0 in /usr/local/lib/python3.8/dist-packages (from astropy>=3.2.3->fruitbat) (2.0.0.1)
Requirement already satisfied: pybind11>=2.2 in /usr/local/lib/python3.8/dist-packages (from pygedm>=3.2.3->fruitbat) (2.9.2)
Requirement already satisfied: pyparsing>=2.2.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=2.2.4->fruitbat) (3.0.4)
Requirement already satisfied: pillow>=6.2.0 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=2.2.4->fruitbat) (8.4.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=2.2.4->fruitbat) (1.3.2)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.8/dist-packages (from matplotlib>=2.2.4->fruitbat) (0.11.0)
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas>=0.22.0->fruitbat) (1.14.0)
Building wheels for collected packages: pygedm
Building wheel for pygedm (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-20h6udmp/pygedm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-20h6udmp/pygedm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-3w0atxbb
cwd: /tmp/pip-install-20h6udmp/pygedm/
Complete output (173 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pygedm
copying pygedm/healpix_utils.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ne2001_wrapper.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ymw16_wrapper.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/yt2020.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/__init__.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/pygedm.py -> build/lib.linux-x86_64-3.8/pygedm
running egg_info
writing pygedm.egg-info/PKG-INFO
writing dependency_links to pygedm.egg-info/dependency_links.txt
writing requirements to pygedm.egg-info/requires.txt
writing top-level names to pygedm.egg-info/top_level.txt
reading manifest file 'pygedm.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pygedm.egg-info/SOURCES.txt'
copying pygedm/gal01.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ne_arms_log_mod.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ne_gc.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/neclumpN.NE2001.dat -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/nelism.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/nevoidN.NE2001.dat -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/spiral.txt -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ymw16par.txt -> build/lib.linux-x86_64-3.8/pygedm
running build_ext
creating tmp
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c /tmp/tmp1ym282h5.cpp -o tmp/tmp1ym282h5.o -std=c++14
building 'ymw16' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/ymw16_src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/main.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/main.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/dora.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/dora.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/dora.cpp: In function ‘void dora(double, double, double, double*, Dora)’:
ymw16_src/dora.cpp:32:10: warning: unused variable ‘dag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/dora.cpp:32:15: warning: unused variable ‘pag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/dora.cpp:35:36: warning: unused variable ‘alpha’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/dora.cpp:35:43: warning: unused variable ‘delta’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/dora.cpp:44:10: warning: unused variable ‘Rl’ [-Wunused-variable]
44 | double Rl;
| ^~
ymw16_src/dora.cpp:45:10: warning: unused variable ‘Al’ [-Wunused-variable]
45 | double Al=3000;//pc
| ^~
ymw16_src/dora.cpp:46:10: warning: unused variable ‘Hl’ [-Wunused-variable]
46 | double Hl=800;//pc
| ^~
ymw16_src/dora.cpp:47:7: warning: unused variable ‘gl’ [-Wunused-variable]
47 | int gl,gD;
| ^~
ymw16_src/dora.cpp:51:10: warning: unused variable ‘dag_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~~
ymw16_src/dora.cpp:51:17: warning: unused variable ‘pag_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~~
ymw16_src/dora.cpp:51:24: warning: unused variable ‘xc_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~
ymw16_src/dora.cpp:51:30: warning: unused variable ‘yc_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~
ymw16_src/dora.cpp:51:36: warning: unused variable ‘zc_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~
ymw16_src/dora.cpp:55:29: warning: variable ‘s_dag’ set but not used [-Wunused-but-set-variable]
55 | double s_cpl,c_cpl, c_dag,s_dag,sc_dp,ss_dp;
| ^~~~~
ymw16_src/dora.cpp:56:17: warning: variable ‘s_dagD’ set but not used [-Wunused-but-set-variable]
56 | double c_dagD,s_dagD,sc_dpD,ss_dpD;
| ^~~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/fermibubble.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/fermibubble.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/frb_d.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/frb_d.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/galcen.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/galcen.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/gum.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/gum.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/lmc.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/lmc.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/lmc.cpp: In function ‘void lmc(double, double, double, int*, double*, LMC)’:
ymw16_src/lmc.cpp:32:10: warning: unused variable ‘dag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/lmc.cpp:32:15: warning: unused variable ‘pag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/lmc.cpp:35:36: warning: unused variable ‘alpha’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/lmc.cpp:35:43: warning: unused variable ‘delta’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/lmc.cpp:47:11: warning: unused variable ‘gD’ [-Wunused-variable]
47 | int gl, gD;
| ^~
ymw16_src/lmc.cpp:49:29: warning: variable ‘s_dag’ set but not used [-Wunused-but-set-variable]
49 | double s_cpl,c_cpl, c_dag,s_dag,sc_dp,ss_dp;
| ^~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/localbubble.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/localbubble.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/ne_crd.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/ne_crd.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/ne_crd.cpp: In function ‘double ne_crd(double*, double*, double*, double*, double*, double*, int, int, char*, char*)’:
ymw16_src/ne_crd.cpp:47:25: warning: unused variable ‘ll’ [-Wunused-variable]
47 | double x_s, y_s, z_s, ll, bb, hh, r, sl, cl, sb, cb;
| ^~
ymw16_src/ne_crd.cpp:47:29: warning: unused variable ‘bb’ [-Wunused-variable]
47 | double x_s, y_s, z_s, ll, bb, hh, r, sl, cl, sb, cb;
| ^~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/nps.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/nps.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/smc.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/smc.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/spiral.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/spiral.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/spiral.cpp: In function ‘void spiral(double, double, double, double, double*, double, Spiral, char*)’:
ymw16_src/spiral.cpp:32:10: warning: variable ‘which_arm’ set but not used [-Wunused-but-set-variable]
32 | int i, which_arm;
| ^~~~~~~~~
ymw16_src/spiral.cpp:35:39: warning: variable ‘saxis’ set but not used [-Wunused-but-set-variable]
35 | double armr1, armr2, smin, sminmin, saxis, uu, Aaa, HH, Hg;
| ^~~~~
ymw16_src/spiral.cpp:35:50: warning: unused variable ‘Aaa’ [-Wunused-variable]
35 | double armr1, armr2, smin, sminmin, saxis, uu, Aaa, HH, Hg;
| ^~~
ymw16_src/spiral.cpp:37:17: warning: unused variable ‘alpha’ [-Wunused-variable]
37 | double theta, alpha, armr;
| ^~~~~
ymw16_src/spiral.cpp:40:10: warning: unused variable ‘g1’ [-Wunused-variable]
40 | double g1=0;
| ^~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/thick.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/thick.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/thin.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/thin.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/thin.cpp: In function ‘void thin(double, double, double, double, double*, double, Thin)’:
ymw16_src/thin.cpp:29:18: warning: unused variable ‘ex1’ [-Wunused-variable]
29 | double g2, Hg, ex1, ex2, g3, HH;
| ^~~
ymw16_src/thin.cpp:29:23: warning: unused variable ‘ex2’ [-Wunused-variable]
29 | double g2, Hg, ex1, ex2, g3, HH;
| ^~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/ymw16par.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/ymw16par.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/ymw16par.cpp: In function ‘int ymw16par(Warp_Sun*, Thick*, Thin*, Spiral*, GC*, Gum*, LB*, LI*, FB*, LMC*, Dora*, SMC*, char*)’:
ymw16_src/ymw16par.cpp:31:10: warning: unused variable ‘value’ [-Wunused-variable]
31 | double value;
| ^~~~~
ymw16_src/ymw16par.cpp:32:10: warning: unused variable ‘a’ [-Wunused-variable]
32 | double a[5];
| ^
ymw16_src/ymw16par.cpp:33:7: warning: unused variable ‘i’ [-Wunused-variable]
33 | int i;
| ^
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/dmdtau2.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/dmdtau2.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/dmdtau2.cpp: In function ‘std::map<std::__cxx11::basic_string<char>, float> dmdtau2(double, double, double, double, int, int, int, char*, char*)’:
ymw16_src/dmdtau2.cpp:286:36: warning: ‘dmstep’ may be used uninitialized in this function [-Wmaybe-uninitialized]
286 | dist=dd-0.5*dstep-(dstep*(dmm-dm))/dmstep;
| ~~~~~~~~~~~~~~~~^~~~~~~
ymw16_src/dmdtau2.cpp:417:25: warning: ‘uu’ may be used uninitialized in this function [-Wmaybe-uninitialized]
417 | result = frb_d(DDM, DM_Gal, DM_MC, DM_Host, uu, vbs, text);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ymw16_src/dmdtau2.cpp:417:25: warning: ‘DDM’ may be used uninitialized in this function [-Wmaybe-uninitialized]
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.8/ymw16_src/main.o build/temp.linux-x86_64-3.8/ymw16_src/dora.o build/temp.linux-x86_64-3.8/ymw16_src/fermibubble.o build/temp.linux-x86_64-3.8/ymw16_src/frb_d.o build/temp.linux-x86_64-3.8/ymw16_src/galcen.o build/temp.linux-x86_64-3.8/ymw16_src/gum.o build/temp.linux-x86_64-3.8/ymw16_src/lmc.o build/temp.linux-x86_64-3.8/ymw16_src/localbubble.o build/temp.linux-x86_64-3.8/ymw16_src/ne_crd.o build/temp.linux-x86_64-3.8/ymw16_src/nps.o build/temp.linux-x86_64-3.8/ymw16_src/smc.o build/temp.linux-x86_64-3.8/ymw16_src/spiral.o build/temp.linux-x86_64-3.8/ymw16_src/thick.o build/temp.linux-x86_64-3.8/ymw16_src/thin.o build/temp.linux-x86_64-3.8/ymw16_src/ymw16par.o build/temp.linux-x86_64-3.8/ymw16_src/dmdtau2.o -o build/lib.linux-x86_64-3.8/ymw16.cpython-38-x86_64-linux-gnu.so -lm
building 'ne21c' extension
creating build/temp.linux-x86_64-3.8/ne21c
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ne21c -I/usr/include/python3.8 -c ne21c/main.cpp -o build/temp.linux-x86_64-3.8/ne21c/main.o -Wno-write-strings -DVERSION_INFO="3.3.0" -std=c++14
In file included from ne21c/main.cpp:12:
ne21c/ne21.c:13:10: fatal error: f2c.h: No such file or directory
13 | #include "f2c.h"
| ^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pygedm
Running setup.py clean for pygedm
Failed to build pygedm
Installing collected packages: pygedm, fruitbat
Running setup.py install for pygedm ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-20h6udmp/pygedm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-20h6udmp/pygedm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-uxb87b6j/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pygedm
cwd: /tmp/pip-install-20h6udmp/pygedm/
Complete output (172 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/pygedm
copying pygedm/healpix_utils.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ne2001_wrapper.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ymw16_wrapper.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/yt2020.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/__init__.py -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/pygedm.py -> build/lib.linux-x86_64-3.8/pygedm
running egg_info
writing pygedm.egg-info/PKG-INFO
writing dependency_links to pygedm.egg-info/dependency_links.txt
writing requirements to pygedm.egg-info/requires.txt
writing top-level names to pygedm.egg-info/top_level.txt
reading manifest file 'pygedm.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pygedm.egg-info/SOURCES.txt'
copying pygedm/gal01.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ne_arms_log_mod.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ne_gc.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/neclumpN.NE2001.dat -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/nelism.inp -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/nevoidN.NE2001.dat -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/spiral.txt -> build/lib.linux-x86_64-3.8/pygedm
copying pygedm/ymw16par.txt -> build/lib.linux-x86_64-3.8/pygedm
running build_ext
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.8 -c /tmp/tmpwgfztnmh.cpp -o tmp/tmpwgfztnmh.o -std=c++14
building 'ymw16' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/ymw16_src
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/main.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/main.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/dora.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/dora.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/dora.cpp: In function ‘void dora(double, double, double, double*, Dora)’:
ymw16_src/dora.cpp:32:10: warning: unused variable ‘dag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/dora.cpp:32:15: warning: unused variable ‘pag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/dora.cpp:35:36: warning: unused variable ‘alpha’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/dora.cpp:35:43: warning: unused variable ‘delta’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/dora.cpp:44:10: warning: unused variable ‘Rl’ [-Wunused-variable]
44 | double Rl;
| ^~
ymw16_src/dora.cpp:45:10: warning: unused variable ‘Al’ [-Wunused-variable]
45 | double Al=3000;//pc
| ^~
ymw16_src/dora.cpp:46:10: warning: unused variable ‘Hl’ [-Wunused-variable]
46 | double Hl=800;//pc
| ^~
ymw16_src/dora.cpp:47:7: warning: unused variable ‘gl’ [-Wunused-variable]
47 | int gl,gD;
| ^~
ymw16_src/dora.cpp:51:10: warning: unused variable ‘dag_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~~
ymw16_src/dora.cpp:51:17: warning: unused variable ‘pag_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~~
ymw16_src/dora.cpp:51:24: warning: unused variable ‘xc_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~
ymw16_src/dora.cpp:51:30: warning: unused variable ‘yc_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~
ymw16_src/dora.cpp:51:36: warning: unused variable ‘zc_D’ [-Wunused-variable]
51 | double dag_D, pag_D, xc_D, yc_D, zc_D, X_D, Y_D, Z_D, R_D, A_D;
| ^~~~
ymw16_src/dora.cpp:55:29: warning: variable ‘s_dag’ set but not used [-Wunused-but-set-variable]
55 | double s_cpl,c_cpl, c_dag,s_dag,sc_dp,ss_dp;
| ^~~~~
ymw16_src/dora.cpp:56:17: warning: variable ‘s_dagD’ set but not used [-Wunused-but-set-variable]
56 | double c_dagD,s_dagD,sc_dpD,ss_dpD;
| ^~~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/fermibubble.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/fermibubble.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/frb_d.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/frb_d.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/galcen.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/galcen.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/gum.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/gum.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/lmc.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/lmc.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/lmc.cpp: In function ‘void lmc(double, double, double, int*, double*, LMC)’:
ymw16_src/lmc.cpp:32:10: warning: unused variable ‘dag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/lmc.cpp:32:15: warning: unused variable ‘pag’ [-Wunused-variable]
32 | double dag, pag, npag, iag;
| ^~~
ymw16_src/lmc.cpp:35:36: warning: unused variable ‘alpha’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/lmc.cpp:35:43: warning: unused variable ‘delta’ [-Wunused-variable]
35 | double l_cp, alpha_cp, delta_cp, alpha, delta;
| ^~~~~
ymw16_src/lmc.cpp:47:11: warning: unused variable ‘gD’ [-Wunused-variable]
47 | int gl, gD;
| ^~
ymw16_src/lmc.cpp:49:29: warning: variable ‘s_dag’ set but not used [-Wunused-but-set-variable]
49 | double s_cpl,c_cpl, c_dag,s_dag,sc_dp,ss_dp;
| ^~~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/localbubble.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/localbubble.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/ne_crd.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/ne_crd.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/ne_crd.cpp: In function ‘double ne_crd(double*, double*, double*, double*, double*, double*, int, int, char*, char*)’:
ymw16_src/ne_crd.cpp:47:25: warning: unused variable ‘ll’ [-Wunused-variable]
47 | double x_s, y_s, z_s, ll, bb, hh, r, sl, cl, sb, cb;
| ^~
ymw16_src/ne_crd.cpp:47:29: warning: unused variable ‘bb’ [-Wunused-variable]
47 | double x_s, y_s, z_s, ll, bb, hh, r, sl, cl, sb, cb;
| ^~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/nps.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/nps.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/smc.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/smc.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/spiral.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/spiral.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/spiral.cpp: In function ‘void spiral(double, double, double, double, double*, double, Spiral, char*)’:
ymw16_src/spiral.cpp:32:10: warning: variable ‘which_arm’ set but not used [-Wunused-but-set-variable]
32 | int i, which_arm;
| ^~~~~~~~~
ymw16_src/spiral.cpp:35:39: warning: variable ‘saxis’ set but not used [-Wunused-but-set-variable]
35 | double armr1, armr2, smin, sminmin, saxis, uu, Aaa, HH, Hg;
| ^~~~~
ymw16_src/spiral.cpp:35:50: warning: unused variable ‘Aaa’ [-Wunused-variable]
35 | double armr1, armr2, smin, sminmin, saxis, uu, Aaa, HH, Hg;
| ^~~
ymw16_src/spiral.cpp:37:17: warning: unused variable ‘alpha’ [-Wunused-variable]
37 | double theta, alpha, armr;
| ^~~~~
ymw16_src/spiral.cpp:40:10: warning: unused variable ‘g1’ [-Wunused-variable]
40 | double g1=0;
| ^~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/thick.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/thick.o -DVERSION_INFO="3.3.0" -std=c++14
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/thin.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/thin.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/thin.cpp: In function ‘void thin(double, double, double, double, double*, double, Thin)’:
ymw16_src/thin.cpp:29:18: warning: unused variable ‘ex1’ [-Wunused-variable]
29 | double g2, Hg, ex1, ex2, g3, HH;
| ^~~
ymw16_src/thin.cpp:29:23: warning: unused variable ‘ex2’ [-Wunused-variable]
29 | double g2, Hg, ex1, ex2, g3, HH;
| ^~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/ymw16par.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/ymw16par.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/ymw16par.cpp: In function ‘int ymw16par(Warp_Sun*, Thick*, Thin*, Spiral*, GC*, Gum*, LB*, LI*, FB*, LMC*, Dora*, SMC*, char*)’:
ymw16_src/ymw16par.cpp:31:10: warning: unused variable ‘value’ [-Wunused-variable]
31 | double value;
| ^~~~~
ymw16_src/ymw16par.cpp:32:10: warning: unused variable ‘a’ [-Wunused-variable]
32 | double a[5];
| ^
ymw16_src/ymw16par.cpp:33:7: warning: unused variable ‘i’ [-Wunused-variable]
33 | int i;
| ^
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ymw16_src -I/usr/include/python3.8 -c ymw16_src/dmdtau2.cpp -o build/temp.linux-x86_64-3.8/ymw16_src/dmdtau2.o -DVERSION_INFO="3.3.0" -std=c++14
ymw16_src/dmdtau2.cpp: In function ‘std::map<std::__cxx11::basic_string<char>, float> dmdtau2(double, double, double, double, int, int, int, char*, char*)’:
ymw16_src/dmdtau2.cpp:286:36: warning: ‘dmstep’ may be used uninitialized in this function [-Wmaybe-uninitialized]
286 | dist=dd-0.5*dstep-(dstep*(dmm-dm))/dmstep;
| ~~~~~~~~~~~~~~~~^~~~~~~
ymw16_src/dmdtau2.cpp:417:25: warning: ‘uu’ may be used uninitialized in this function [-Wmaybe-uninitialized]
417 | result = frb_d(DDM, DM_Gal, DM_MC, DM_Host, uu, vbs, text);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ymw16_src/dmdtau2.cpp:417:25: warning: ‘DDM’ may be used uninitialized in this function [-Wmaybe-uninitialized]
x86_64-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.8/ymw16_src/main.o build/temp.linux-x86_64-3.8/ymw16_src/dora.o build/temp.linux-x86_64-3.8/ymw16_src/fermibubble.o build/temp.linux-x86_64-3.8/ymw16_src/frb_d.o build/temp.linux-x86_64-3.8/ymw16_src/galcen.o build/temp.linux-x86_64-3.8/ymw16_src/gum.o build/temp.linux-x86_64-3.8/ymw16_src/lmc.o build/temp.linux-x86_64-3.8/ymw16_src/localbubble.o build/temp.linux-x86_64-3.8/ymw16_src/ne_crd.o build/temp.linux-x86_64-3.8/ymw16_src/nps.o build/temp.linux-x86_64-3.8/ymw16_src/smc.o build/temp.linux-x86_64-3.8/ymw16_src/spiral.o build/temp.linux-x86_64-3.8/ymw16_src/thick.o build/temp.linux-x86_64-3.8/ymw16_src/thin.o build/temp.linux-x86_64-3.8/ymw16_src/ymw16par.o build/temp.linux-x86_64-3.8/ymw16_src/dmdtau2.o -o build/lib.linux-x86_64-3.8/ymw16.cpython-38-x86_64-linux-gnu.so -lm
building 'ne21c' extension
creating build/temp.linux-x86_64-3.8/ne21c
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/usr/local/lib/python3.8/dist-packages/pybind11/include -I/tmp/pip-install-20h6udmp/pygedm/ne21c -I/usr/include/python3.8 -c ne21c/main.cpp -o build/temp.linux-x86_64-3.8/ne21c/main.o -Wno-write-strings -DVERSION_INFO="3.3.0" -std=c++14
In file included from ne21c/main.cpp:12:
ne21c/ne21.c:13:10: fatal error: f2c.h: No such file or directory
13 | #include "f2c.h"
| ^~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-20h6udmp/pygedm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-20h6udmp/pygedm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-uxb87b6j/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.8/pygedm Check the logs for full command output.
Is this installation error common?
Thanks in advance!
When running
$ python setup.py test
I am getting the following error summary:
---------- coverage: platform linux, python 3.8.18-final-0 -----------
Name Stmts Miss Cover
----------------------------------------------
pygedm/__init__.py 4 0 100%
pygedm/healpix_utils.py 5 2 60%
pygedm/ne2001_wrapper.py 47 30 36%
pygedm/pygedm.py 123 113 8%
pygedm/ymw16_wrapper.py 38 25 34%
pygedm/yt2020.py 73 37 49%
----------------------------------------------
TOTAL 290 207 29%
=========================== short test summary info ============================
ERROR tests/test_basic_ne2001.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_basic_raises.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_basic_ymw.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_basic_yt2020.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_compare.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_healpix_map.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_lbr_to_xyz.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_shared_obj.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
ERROR tests/test_tau_sc.py - TypeError: concatenate() got an unexpected keyword argument 'dtype'
!!!!!!!!!!!!!!!!!!! Interrupted: 9 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 9 errors in 2.17s ===============================
As such pygedm (or any other FORTRAN) will not compile on M1 macs until they support gfortran.
There is an experimental release:
https://github.com/fxcoudert/gfortran-for-macOS/releases/tag/11-arm-alpha2
So might not have to wait too long.
Hi,
It appears to me that there are some inconsistencies with the dm_to_dist function in pygedm.
For some particular lines of sights and radial positions, the predicted distances decrease with increasing DM, which is clearly unphysical, as it would correspond to negative electron densities between the points.
An example script:
import pygedm
gl = 243.49
gb = 45.782
dm_small = 11.21
dm_large = 11.22
print(pygedm.dm_to_dist(gl, gb, dm_small)[0])
print(pygedm.dm_to_dist(gl, gb, dm_large)[0])
This gives:
817.3250122070312 pc
803.8787231445312 pc
The distance starts to increase again with rising DM from there on.
I have found a couple of dozens of such jumps, I can attach a list if needed.
The electron densities at these points are physical and (roughly) consistent with the increase in DM.
Hi,
I'm trying to compute the DM values given the distance and the sky position for a lot of objects.
I have saved the distances and the sky positions in galactic coordinates in numpy.arrays and I was wondering if there is a way to directly pass numpy.arrays as arguments to the methods pygedm.dist_to_dm
.
At the moment if I run the following example:
l_gal = np.array([20, 30])
b_gal = np.array([-10, 30])
dist = np.array([1000, 2000])
dm, _ = pygedm.dist_to_dm(l_gal, b_gal, dist, method='ymw16')
The following error comes out:
TypeError: dmdtau(): incompatible function arguments. The following argument types are supported:
1. (gl: float, gb: float, dordm: float, DM_Host: float, ndir: int, np: int, vbs: int, dirname: str, text: str) -> Dict[str, float]
Looping on the values is a solution but it is also slow for many objects and I'm trying to optimize the script I'm working on.
Thank you very much for the help,
Michele
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.