def test_pl(filename=os.path.join(TMP,'test_pl.h5')):
    mass = (0.83,0.03)
    radius = (0.91,0.03)
    period = 289.8622
    rprs = 0.02
    starmodel_file = resource_filename('vespa','tests/test_starmodel_single.h5')
    starmodel = StarModel.load_hdf(starmodel_file)
    pop = PlanetPopulation(period=period, rprs=rprs,
                       starmodel=starmodel, n=100, MAfn=MAfn)

    pop.save_hdf(filename, overwrite=True)
    pop2 = PlanetPopulation.load_hdf(filename)
    assert type(pop2)==PlanetPopulation
    os.remove(filename)
Example #2
0
def test_pl(filename=os.path.join(TMP, 'test_pl.h5')):
    mass = (0.83, 0.03)
    radius = (0.91, 0.03)
    period = 289.8622
    rprs = 0.02
    starmodel_file = resource_filename('vespa',
                                       'tests/test_starmodel_single.h5')
    starmodel = StarModel.load_hdf(starmodel_file)
    pop = PlanetPopulation(period=period,
                           rprs=rprs,
                           starmodel=starmodel,
                           n=100,
                           MAfn=MAfn)

    pop.save_hdf(filename, overwrite=True)
    pop2 = PlanetPopulation.load_hdf(filename)
    assert type(pop2) == PlanetPopulation
    os.remove(filename)