def test_convertephem(): """ Verify whether convertephem works as expected. """ inputtab = 'Titan-ALMA.tab' reftab = 'Titan-geocentric.tab' if not os.path.exists(inputtab): rval = os.system('cp -R ' + os.environ['CASAPATH'].split()[0] + '/data/regression/unittest/fixplanets/' + inputtab + ' .') if rval != 0: raise Exception, "Error copying input data" if not os.path.exists(reftab): rval = os.system('cp -R ' + os.environ['CASAPATH'].split()[0] + '/data/regression/unittest/fixplanets/' + reftab + ' .') if rval != 0: raise Exception, "Error copying reference data" outtab = 'geo-titan.tab' import recipes.ephemerides.convertephem as ce ce.converttopoephem2geo(inputtab, outtab) return compare(outtab, reftab, 0.6 / 3600., 1E-4) # tolerances in deg and km/s resp.
def test_convertephem(): """ Verify whether convertephem works as expected. """ inputtab = 'fewdays-topo.txt.tab' reftab = 'fewdays-geo.txt.tab' if not os.path.exists(inputtab): rval = os.system('cp -R ' + os.environ['CASAPATH'].split()[0] + '/data/regression/unittest/fixplanets/' + inputtab + ' .') if rval != 0: raise Exception, "Error copying input data" if not os.path.exists(reftab): rval = os.system('cp -R ' + os.environ['CASAPATH'].split()[0] + '/data/regression/unittest/fixplanets/' + reftab + ' .') if rval != 0: raise Exception, "Error copying reference data" outtab = 'geo-fewdays-topo.txt.tab' import recipes.ephemerides.convertephem as ce ce.converttopoephem2geo(inputtab, outtab) return compare(outtab, reftab, 1.7 / 3600., 0.6)
def test_convertephem(): """ Verify whether convertephem works as expected. """ inputtab = 'Titan-ALMA.tab' reftab = 'Titan-geocentric.tab' if not os.path.exists(inputtab): rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/fixplanets/'+inputtab+' .') if rval!=0: raise Exception, "Error copying input data" if not os.path.exists(reftab): rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/fixplanets/'+reftab+' .') if rval!=0: raise Exception, "Error copying reference data" outtab = 'geo-titan.tab' import recipes.ephemerides.convertephem as ce ce.converttopoephem2geo(inputtab, outtab) return compare(outtab, reftab, 0.6/3600., 1E-4) # tolerances in deg and km/s resp.
def test_convertephem(): """ Verify whether convertephem works as expected. """ inputtab = 'fewdays-topo.txt.tab' reftab = 'fewdays-geo.txt.tab' if not os.path.exists(inputtab): rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/fixplanets/'+inputtab+' .') if rval!=0: raise Exception, "Error copying input data" if not os.path.exists(reftab): rval = os.system('cp -R '+os.environ['CASAPATH'].split()[0]+'/data/regression/unittest/fixplanets/'+reftab+' .') if rval!=0: raise Exception, "Error copying reference data" outtab = 'geo-fewdays-topo.txt.tab' import recipes.ephemerides.convertephem as ce ce.converttopoephem2geo(inputtab, outtab) return compare(outtab, reftab, 1.7/3600., 0.6)