nanograv / PINT

PINT is not TEMPO3 -- Software for high-precision pulsar timing
Other
121 stars 101 forks source link

Failed in the installation following the document on-line #426

Closed lupin0lin closed 1 year ago

lupin0lin commented 6 years ago

To whom will concern it,

I tried to install PINT following the on-line document (https://nanograv-pint.readthedocs.io/en/latest/installation.html) on my Mac (OS 10.12.6). And no obvious error message when I try to compile the program with

python setup.py install

But when I tried to run the test, I obtained 4 errors and I cannot ensure whether I have successfully installed the package.

Ran 103 tests in 267.917s FAILED (errors=4)

The major errors are related to load the ephemeris file, for example,

ERROR: test_earth (test_solar_system_body.TestSolarSystemDynamic)

Traceback (most recent call last): File "/Users/lupin/PINT/tests/test_solar_system_body.py", line 31, in test_earth a = objPosVel_wrt_SSB('earth', self.tdb_time ,ephem = ep) File "/Users/lupin/PINT/pint/solar_system_ephemerides.py", line 134, in objPosVel_wrt_SSB raise ValueError("Can not load the ephemeris file '%s.bsp'. " % ephem) ValueError: Can not load the ephemeris file 'de430.bsp'.

ERROR: test_earth2obj (test_solar_system_body.TestSolarSystemDynamic)

Traceback (most recent call last): File "/Users/lupin/PINT/tests/test_solar_system_body.py", line 55, in test_earth2obj a = objPosVel('earth', obj, self.tdb_time, ep) File "/Users/lupin/PINT/pint/solar_system_ephemerides.py", line 170, in objPosVel obj1pv = objPosVel_wrt_SSB(obj1,t,ephem) File "/Users/lupin/PINT/pint/solar_system_ephemerides.py", line 134, in objPosVel_wrt_SSB raise ValueError("Can not load the ephemeris file '%s.bsp'. " % ephem) ValueError: Can not load the ephemeris file 'de430.bsp'.

ERROR: test_planets (test_solar_system_body.TestSolarSystemDynamic)

Traceback (most recent call last): File "/Users/lupin/PINT/tests/test_solar_system_body.py", line 46, in test_planets a = objPosVel_wrt_SSB(p, self.tdb_time ,ephem = ep) File "/Users/lupin/PINT/pint/solar_system_ephemerides.py", line 134, in objPosVel_wrt_SSB raise ValueError("Can not load the ephemeris file '%s.bsp'. " % ephem) ValueError: Can not load the ephemeris file 'de430.bsp'.

ERROR: test_sun (test_solar_system_body.TestSolarSystemDynamic)

Traceback (most recent call last): File "/Users/lupin/PINT/tests/test_solar_system_body.py", line 38, in test_sun a = objPosVel_wrt_SSB('sun', self.tdb_time ,ephem = ep) File "/Users/lupin/PINT/pint/solar_system_ephemerides.py", line 134, in objPosVel_wrt_SSB raise ValueError("Can not load the ephemeris file '%s.bsp'. " % ephem) ValueError: Can not load the ephemeris file 'de430.bsp'.

I do not clearly understand the possible origin to cause these errors, can anyone give me a hand to solve them?

Hazboun6 commented 6 years ago

I'll add the following erros I got when running the test just now on my new MacBook Pro, running Python 3.6.2. The seem mostly focused on J1713 models...

======================================================================
ERROR: test_J1713 (test_ddk.TestDDK)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/hazboun/software_development/PINT/tests/test_ddk.py", line 34, in test_J1713
    pint_resids_us = resids(self.toasJ1713, self.modelJ1713, False).time_resids.to(u.s)
  File "/Users/hazboun/software_development/PINT/pint/residuals.py", line 15, in __init__
    self.phase_resids = self.calc_phase_resids(weighted_mean=weighted_mean)
  File "/Users/hazboun/software_development/PINT/pint/residuals.py", line 26, in calc_phase_resids
    rs = self.model.phase(self.toas)
  File "/Users/hazboun/software_development/PINT/pint/models/timing_model.py", line 489, in phase
    delay = self.delay(toas)
  File "/Users/hazboun/software_development/PINT/pint/models/timing_model.py", line 483, in delay
    delay += df(toas, delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 182, in binarymodel_delay
    self.update_binary_object(toas, acc_delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 158, in update_binary_object
    if hasattr(self, par) or \
  File "/Users/hazboun/software_development/PINT/pint/models/binary_ddk.py", line 41, in PMRA_DDK
    params = self.get_params_as_ICRS()
  File "/Users/hazboun/software_development/PINT/pint/models/astrometry.py", line 413, in get_params_as_ICRS
    d_lon_coslat=dlon_coslat, d_lat=self.PMELAT.quantity)
  File "/Users/hazboun/anaconda3/lib/python3.6/site-packages/astropy/coordinates/baseframe.py", line 582, in __init__
    list(kwargs)))
TypeError: Coordinate frame got unexpected keywords: ['d_lon_coslat', 'd_lat']
-------------------- >> begin captured logging << --------------------
astropy: INFO: Applying clock corrections (include_GPS = True, include_BIPM = True.
astropy: INFO: Evaluating observatory clock corrections.
astropy: INFO: Applying GPS to UTC clock correction (~few nanoseconds)
astropy: INFO: Applying TT(TAI) to TT(BIPM) clock correction (~27 us)
astropy: INFO: Evaluating observatory clock corrections.
astropy: INFO: Applying GPS to UTC clock correction (~few nanoseconds)
astropy: INFO: Applying TT(TAI) to TT(BIPM) clock correction (~27 us)
astropy: INFO: Computing TDB columns.
astropy: INFO: Computing positions and velocities of observatories and Earth (planets = False), using DE421 ephemeris
astropy: WARNING: Unrecognized parfile line 'MODE                     1'
astropy: WARNING: Unrecognized parfile line 'INFO -f'
astropy: WARNING: DDK model uses KIN as inclination angle. SINI will not be used.
astropy: INFO: Using ICRS equatorial coordinate. The parameter KOM is measured respect to equatorial North.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: test_J1713_binary_delay (test_ddk.TestDDK)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/hazboun/software_development/PINT/tests/test_ddk.py", line 29, in test_J1713_binary_delay
    pint_binary_delay = self.modelJ1713.binarymodel_delay(self.toasJ1713, None)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 182, in binarymodel_delay
    self.update_binary_object(toas, acc_delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 158, in update_binary_object
    if hasattr(self, par) or \
  File "/Users/hazboun/software_development/PINT/pint/models/binary_ddk.py", line 41, in PMRA_DDK
    params = self.get_params_as_ICRS()
  File "/Users/hazboun/software_development/PINT/pint/models/astrometry.py", line 413, in get_params_as_ICRS
    d_lon_coslat=dlon_coslat, d_lat=self.PMELAT.quantity)
  File "/Users/hazboun/anaconda3/lib/python3.6/site-packages/astropy/coordinates/baseframe.py", line 582, in __init__
    list(kwargs)))
TypeError: Coordinate frame got unexpected keywords: ['d_lon_coslat', 'd_lat']

======================================================================
ERROR: test_J1713_deriv (test_ddk.TestDDK)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/hazboun/software_development/PINT/tests/test_ddk.py", line 42, in test_J1713_deriv
    delay = self.modelJ1713.delay(self.toasJ1713)
  File "/Users/hazboun/software_development/PINT/pint/models/timing_model.py", line 483, in delay
    delay += df(toas, delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 182, in binarymodel_delay
    self.update_binary_object(toas, acc_delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 158, in update_binary_object
    if hasattr(self, par) or \
  File "/Users/hazboun/software_development/PINT/pint/models/binary_ddk.py", line 41, in PMRA_DDK
    params = self.get_params_as_ICRS()
  File "/Users/hazboun/software_development/PINT/pint/models/astrometry.py", line 413, in get_params_as_ICRS
    d_lon_coslat=dlon_coslat, d_lat=self.PMELAT.quantity)
  File "/Users/hazboun/anaconda3/lib/python3.6/site-packages/astropy/coordinates/baseframe.py", line 582, in __init__
    list(kwargs)))
TypeError: Coordinate frame got unexpected keywords: ['d_lon_coslat', 'd_lat']

======================================================================
ERROR: test_K96 (test_ddk.TestDDK)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/hazboun/software_development/PINT/tests/test_ddk.py", line 75, in test_K96
    res = resids(self.toasJ1713, self.modelJ1713, False).time_resids.to(u.s)
  File "/Users/hazboun/software_development/PINT/pint/residuals.py", line 15, in __init__
    self.phase_resids = self.calc_phase_resids(weighted_mean=weighted_mean)
  File "/Users/hazboun/software_development/PINT/pint/residuals.py", line 26, in calc_phase_resids
    rs = self.model.phase(self.toas)
  File "/Users/hazboun/software_development/PINT/pint/models/timing_model.py", line 489, in phase
    delay = self.delay(toas)
  File "/Users/hazboun/software_development/PINT/pint/models/timing_model.py", line 483, in delay
    delay += df(toas, delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 182, in binarymodel_delay
    self.update_binary_object(toas, acc_delay)
  File "/Users/hazboun/software_development/PINT/pint/models/pulsar_binary.py", line 158, in update_binary_object
    if hasattr(self, par) or \
  File "/Users/hazboun/software_development/PINT/pint/models/binary_ddk.py", line 41, in PMRA_DDK
    params = self.get_params_as_ICRS()
  File "/Users/hazboun/software_development/PINT/pint/models/astrometry.py", line 413, in get_params_as_ICRS
    d_lon_coslat=dlon_coslat, d_lat=self.PMELAT.quantity)
  File "/Users/hazboun/anaconda3/lib/python3.6/site-packages/astropy/coordinates/baseframe.py", line 582, in __init__
    list(kwargs)))
TypeError: Coordinate frame got unexpected keywords: ['d_lon_coslat', 'd_lat']

======================================================================
ERROR: test_result (test_zima.TestZima)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/hazboun/software_development/PINT/tests/test_zima.py", line 21, in test_result
    zima.main(cmd.split())
  File "/Users/hazboun/software_development/PINT/pint/scripts/zima.py", line 71, in main
    fuzz = np.random.normal(scale=args.fuzzdays,size=len(times))*u.day
  File "mtrand.pyx", line 1902, in mtrand.RandomState.normal
ValueError: scale <= 0
-------------------- >> begin captured logging << --------------------
astropy: INFO: Reading model from /Users/hazboun/software_development/PINT/tests/datafile/NGC6440E.par
astropy: WARNING: Unrecognized parfile line 'T2CMETHOD           TEMPO'
astropy: INFO: Generating uniformly spaced TOAs
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 103 tests in 134.268s

FAILED (errors=5)
make: *** [test] Error 1
luojing1211 commented 6 years ago

@Hazboun6 Which astropy version are you using?

lupin0lin commented 6 years ago

I use astropy v2.0.8, but is it related to the lack on loading the ephemeris file 'de430.bsp'?

luojing1211 commented 6 years ago

@lupin0lin I think you are fine. Have you tried to reinstall it recently?

Hazboun6 commented 6 years ago

Hi @luojing1211, yeah I'm using astropy 3. I just saw in your requirements.txt that I should be using the older version... Any chance that is going to change soon?

luojing1211 commented 6 years ago

@Hazboun6 We are going to discuss this issue in the telecon today.

Hazboun6 commented 6 years ago

@luojing1211 Just an FYI, I had another issue when I tried to install PINT in an environment with python 3.7 it didn't work. It's very new, so I just backed off to 3.6.2 and everything, except the above errors worked fine. I no longer have the error messages, but the setup.py was erroring out. Just so you know that might be on the horizon. Obviously you could just use Travis CI to test any Python 3.7 issues...

paulray commented 6 years ago

We can't support astropy 3 until we drop support for Python 2.7. See issue #372

lupin0lin commented 6 years ago

@lupin0lin I think you are fine. Have you tried to reinstall it recently?

I installed PINT with the root authority and gained the same errors. Here are the final messages that I gained at the final.

FAILED (errors=4) make: *** [test] Error 1

Or should I re-download the files (any updated?) and try to install again?

abhisrkckl commented 1 year ago

This issue seems to no longer be valid. Closing.