<jupyter_start><jupyter_text>Finding timezone was tricky. Sources:http://tdc-www.harvard.edu/iraf/rvsao/bcvcorr/obsdb.html     (Found timezone)https://greenwichmeantime.com/time-zone/gmt-plus-7/          (Got GMT version)https://en.wikipedia.org/wiki/List_of_tz_database_time_zones (Found location that much timezone)  Location and Dates<jupyter_code># The observer
observatory1 = Observer(longitude = 105.8197 * u.deg,
                    latitude = 32.7802 * u.deg,
                    elevation = 63.4 * u.m,
                    timezone = 'Antarctica/Davis',
                    name = "Apache Point Observatory"
                    )
observatory = Observer.at_site('Apache Point Observatory')
#What I will be observing
my_target = FixedTarget.from_name("M31")

#Observing times
date1 = Time("2019-04-16")
date2 = Time("2019-12-31")
observatory<jupyter_output><empty_output><jupyter_text>How long you can observe it for on the 2 dates<jupyter_code>date = date2
# Copied from Astro300 lecture
astro_set = observatory.twilight_evening_astronomical(date, which='next')
astro_rise = observatory.twilight_morning_astronomical(date, which='next')
midnight_mro = observatory.midnight(date1, which='next')
observing_length = (astro_rise - astro_set).to(u.h)

print("You can observe M31 for {0:.1f} at APO on the December 31st, 2019.".format(observing_length))
date = date1
# Copied from Astro300 lecture
astro_set = observatory.twilight_evening_astronomical(date, which='next')
astro_rise = observatory.twilight_morning_astronomical(date, which='next')
midnight_mro = observatory.midnight(date1, which='next')
observing_length = (astro_rise - astro_set).to(u.h)

print("You can observe M31 for {0:.1f} at APO on the April 4th, 2019.".format(observing_length))<jupyter_output>You can observe M31 for 8.1 h at APO on the April 4th, 2019.<jupyter_text>Best season to view itStrategy: Check viewing coniditions each month and determine best<jupyter_code># Getting a list of dates beginning with the first of each month
dates = list()
for i in range(1,13):
    #Adds 0 if necessary
    appender = ""
    if (i < 10):
        appender = "0"
    
    date = "2019-" + appender + str(i) + "-01 07:00:00"
    item = Time(date)
    dates.append(item)
dates<jupyter_output><empty_output><jupyter_text>Code Taken from Astro 300my_target = FixedTarget.from_name("ngc2403")mro.target_is_up(midnight_mro, my_target)altaz_my_target = mro.altaz(midnight_mro, my_target)altaz_my_target.alt, altaz_my_target.azaltaz_my_target.secz<jupyter_code>visible = observatory.target_is_up(dates,my_target)
visible
# If it is visible I'll find the airmass of it each month
months = list()
vis_for_months = list()
for i in range(len(visible)):
    if visible[i]:
        altaz_my_target = observatory.altaz(dates[i], my_target)
        visibility = altaz_my_target.secz
        if visibility < 2:
            months.append(i)
            vis_for_months.append(visibility)
vis_for_months
months
vis_for_months<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10556110556110557, 'fraction_numerical': 0.03463203463203463, 'mean_word_length': 4.364285714285714, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 16, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '31252', 'license': 'MIT', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1024, 'n_words': 234, 'path': 'obezo_m31.ipynb', 'repo_name': 'pratsingh/NightSky', 'size': '3003'}