예제 #1
0
def test_hwm93():
    # pass on systems without f2py for now
    custom = hwm93(5E5, 45, 50, 365)
    assert_allclose(custom, [-73.00312042236328, 0.1485661268234253])
    
    # Test from pyhwm93
    ans = hwm93(Z=150E3, latitude=65, longitude=-148, day=90, seconds=12*3600, f107=100., f107_avg=100., geomagnetic_disturbance_index=4)
    assert_allclose(ans, [-110.16133880615234, -12.400712013244629])
예제 #2
0
def test_hwm93():
    # pass on systems without f2py for now
    try:
        custom = hwm93(5E5, 45, 50, 365)
        assert_allclose(custom, [-73.00312042236328, 0.1485661268234253])
        
        
        # Test from pyhwm93
        ans = hwm93(Z=150E3, latitude=65, longitude=-148, day=90, seconds=12*3600, f107=100., f107_avg=100., geomagnetic_disturbance_index=4)
        assert_allclose(ans, [-110.16133880615234, -12.400712013244629])
    except:
        pass
예제 #3
0
    m = airmass(lambda Z: ATMOSPHERE_1976(Z).rho, 5)
    assert_close(m, 106861.56335489497)  # vs 106837

    m = airmass(lambda Z: ATMOSPHERE_1976(Z).rho, .1)
    assert_close(m, 379082.24065519444, rtol=1e-6)  # vs 378596

    # airmass(lambda Z : ATMOSPHERE_1976(Z).rho, .1, RI=1.0016977377367)
    # As refractive index increases, the atmospheric mass increases drastically. An exception is being raised numerically, not sure why
    # 7966284.95792788 - that's an 800x atmospheric increase.


hwm93_compiled = True
try:
    # Just check if works
    hwm93(5E5, 45, 50, 365)
except:
    hwm93_compiled = False

hwm14_compiled = True
try:
    hwm14(11000,
          latitude=-45.0,
          longitude=-85.0,
          day=150,
          seconds=12 * 3600,
          geomagnetic_disturbance_index=80)
except:
    hwm14_compiled = False

예제 #4
0
    m = airmass(lambda Z: ATMOSPHERE_1976(Z).rho, 5)
    assert_close(m, 106861.56335489497)  # vs 106837

    m = airmass(lambda Z: ATMOSPHERE_1976(Z).rho, .1)
    assert_close(m, 379082.24065519444, rtol=1e-6)  # vs 378596

    # airmass(lambda Z : ATMOSPHERE_1976(Z).rho, .1, RI=1.0016977377367)
    # As refractive index increases, the atmospheric mass increases drastically. An exception is being raised numerically, not sure why
    # 7966284.95792788 - that's an 800x atmospheric increase.


hwm93_compiled = True
try:
    # Just check if works
    hwm93(5E5, 45.0, 50.0, 365.0)
except:
    hwm93_compiled = False

hwm14_compiled = True
try:
    hwm14(11000.0,
          latitude=-45.0,
          longitude=-85.0,
          day=150,
          seconds=12 * 3600.0,
          geomagnetic_disturbance_index=80.0)
except:
    hwm14_compiled = False