What do the lines in Ithacadat look like There Are 33 Lines Ithaca W07629N4226

What do the lines in ithacadat look like there are 33

This preview shows page 12 - 19 out of 53 pages.

What do the lines in Ithaca.datlook like?
Image of page 12
There Are 33 Lines Ithaca W07629N4226 1 R S R S R S R S R S R S R S R S R S R S R S R S 2 R S R S R S R S R S R S R S R S R S R S R S R S 3 R S R S R S R S R S R S R S R S R S R S R S R S 28 R S R S R S R S R S R S R S R S R S R S R S R S 29 R S R S R S R S R S R S R S R S R S R S R S 30 R S R S R S R S R S R S R S R S R S R S R S 31 R S R S R S R S R S R S R S
Image of page 13
The Data for a Particular City is Housed in a 33-line .dat file Ithaca W07629N4226 1 R S R S R S R S R S R S R S R S R S R S R S R S 2 R S R S R S R S R S R S R S R S R S R S R S R S 3 R S R S R S R S R S R S R S R S R S R S R S R S 28 R S R S R S R S R S R S R S R S R S R S R S R S 29 R S R S R S R S R S R S R S R S R S R S R S 30 R S R S R S R S R S R S R S R S R S R S R S 31 R S R S R S R S R S R S R S Line 2 encodes its longitude and latitude
Image of page 14
Helper Function: LongLat def LongLat(s): Long = float( s[1:4])+ float( s[4:6] )/60 if s[0] =='E': Long = -Long Lat = float( s[7:9])+ float( s[9:11 ])/60 if s[6] =='S': Lat = -Lat return (Lat,Long) A latlong string has length 11 W 081 40 N 41 29
Image of page 15
The Data for a Particular City is Housed in a 33-line .dat file Ithaca W07629N4226 1 R S R S R S R S R S R S R S R S R S R S R S R S 2 R S R S R S R S R S R S R S R S R S R S R S R S 3 R S R S R S R S R S R S R S R S R S R S R S R S 28 R S R S R S R S R S R S R S R S R S R S R S R S 29 R S R S R S R S R S R S R S R S R S R S R S 30 R S R S R S R S R S R S R S R S R S R S R S 31 R S R S R S R S R S R S R S The remaining lines house the rise-set data. Each R and S is a length- 4 string: ‘0736’
Image of page 16
Helper Function: ConvertTime def ConvertTime(s): x = float(s[:2])+float(s[2:])/60 return x In comes a length-4 string and back comes a float that encodes the time in hours ‘0736’ ----> 7 + 36/60 hours ----> 7.6
Image of page 17
The Data for a Particular City is Housed in a 33-line .dat file Ithaca W07629N4226 1 R S R S R S R S R S R S R S R S R S R S R S R S 2 R S R S R S R S R S R S R S R S R S R S R S R S 3 R S R S R S R S R S R S R S R S R S R S R S R S 28 R S R S R S R S R S R S R S R S R S R S R S R S 29 R S R S R S R S R S R S R S R S R S R S R S 30 R S R S R S
Image of page 18
Image of page 19

You've reached the end of your free preview.

Want to read all 53 pages?

  • Fall '19
  • Array, NumPy arrays, R S R S

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture