コード例 #1
0
ファイル: CPM.py プロジェクト: fsbr/unh-startracker
def calibrationObservation(shortList, t0, pitch, roll):
    # this function runs ST.py with the values from three stars from the "short List"
    # we still need data from the almanac but there's defintiely a way to leverage the astrometry data
    # t0[2] = t0[2] + 4 #lets worry about correcting the
    shorterList = []
    for x in range(0, len(shortList)):
        for name in shortList[x]["names"]:
            # print shortList[x]['names'][name]
            print name

            starName = name
            if starName == "14Aql":
                shortList[x]["sha"] = [74, 16.375]
                shortList[x]["dec"] = [-3, 41.9393]
                shorterList.append(shortList[x])
            elif starName == "15Aql":
                shortList[x]["sha"] = [73, 26.2652]
                shortList[x]["dec"] = [-4, 52.95334]

                shorterList.append(shortList[x])
            elif starName == u"\u03bb Aql":
                shortList[x]["sha"] = [73.0, 26.26254]
                shortList[x]["dec"] = [-4, 52.95335]
                shorterList.append(shortList[x])
            elif starName == "Vega":
                shortList[x]["sha"] = [80, 47.02134]
                shortList[x]["dec"] = [38, 47.1234]
                shorterList.append(shortList[x])
            elif starName == "Sheliak":
                shortList[x]["sha"] = [77, 28.8012]
                shortList[x]["dec"] = [33, 21.7601]
                shorterList.append(shortList[x])
            elif starName == "Sulafat":
                shortList[x]["sha"] = [75, 15.8444]
                shortList[x]["dec"] = [32, 41.3734]
                shorterList.append(shortList[x])
            else:
                pass

    print "actually used observations are ===== %s" % shorterList
    observations = []

    for x in shorterList:
        # have to define the gha as constants for now
        # gha0 = [17,17.8]
        # gha1 = [32, 20.3]
        gha0 = [32, 20.3]
        gha1 = [47, 33.7]
        Ho = x["ho"]
        sha = x["sha"]
        dec = x["dec"]
        observations.append(ST.Observation(t0, Ho, sha, gha0, gha1, dec, pitch))
        f.write(
            "%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
            % (x["ho"], x["newx"], x["newy"], x["pixelx"], x["pixely"], x["xOff"], x["yOff"], pitch, roll)
        )
    print "OBSERVATIONS ====== %s" % observations
    ST.runLocateMeALot(observations)
コード例 #2
0
import ST

t = [0,53,13]
ghaZero = [16,18.7]
ghaOne = [31, 21.1]
meanBias = 5.356 # total amount of diff. i need to get out of my system
accounted = 2.7 # stuff i've actually been able to account for so far
dt = -2

alshain = ST.Observation([0,53, 13+dt], 54.6176 - meanBias,[61, 10.299], ghaZero, ghaOne, [6,24.4])
altair2 = ST.Observation([0,53,13+dt], 56.3854 - meanBias, [62, 18.2504], ghaZero, ghaOne, [8,52.0993])
tarazed = ST.Observation([0,53,13+dt],57.4902 - meanBias, [63, 26.1049], ghaZero, ghaOne, [10, 36.7657])
obs = [alshain, altair2, tarazed]

ST.runLocateMeALot(obs)