def test_load_star_data_format(self): star_sources = ['star0.txt', 'star1.txt', 'star2.txt', 'star3.txt', 'star4.txt', 'star5.txt', 'star6.txt', 'star7.txt', 'star8.txt', 'star9.txt'] stars = list() for s in star_sources: stars.append(StarObservation(s, data.from_test_data(s))) # print stars[0].getrelvelos()[0] for i in xrange(0, len(stars)): print "Star: %s" % (stars[i].name) print "Mean velocity %s" % (stars[i].getDoplerMean()) # print "Doplervalues\n", stars[i].getDoplerValues() stars[i].printRelVelocityPlot(data.from_test_data('RelVeloscurve_star%i.png' % (i))) stars[i].printFluxPlot(data.from_test_data('Lightcurve_star%i.png' % (i)))
def test_dopler_value(self): star0 = StarObservation('star0.txt', data.from_test_data('star0.txt')) self.assertEquals(10086.778269557369640097022056579589843750, star0.getDopler(656.3220665085942755))