RUVIDEO
Поделитесь видео 🙏

Python, Bing Chat & Astronomy

I wanted to use Bing Chat to help me explore a topic I wasn’t familiar with. I thought I’d be able to go deeper with the Search than a normal Web browser search, and had the topic of Keplers orbit calculations as the initial topic. After getting the initial information I then asked if there were any python code that could find locations of objects in the sky (to see if I could use them for the Kepler equations) and got the Skyfield Python Library.
After starting another set of questions with Bing Chat I got python code to calculate where planets would be in the sky from a particular location on Earth. I gave my location in Lat/Long and got it to work out the location of the sun in Altitude & Azimuth at the current time.
It gave me the data and I used Stellarium to check if the Sun was in that location. It was near but the 2 sets of figures were slightly out.
So I asked Bing Chat if there was an alternative method and it came up with the Python Astropy library and also gave code to test that too. Initially that dod not work because it used the “SkyCoord.from_name('Mars')” method which looks up the astronomical object via an API (website https://www.le-systeme-solaire.net/) and the API does not return any astronomical objects in the solar system, but when tested on objects outside of the solar system it works fine.
So Bing Chat gave me an alternative method to getting this data using a different module ogf the library and the resulting script gives the same Altitude & Azimuth as does Stellarium, to the nearest Degree at this point.
So I was very pleased with the result. In under 4 hours, with a view views of YouTube videos and other web searching about Julian Calendar, Right ascention & Declination & Altitude and Azimuth and playing with the python code I was able to make a credible attempt at predicting where Astronomical objects would be at a specific time.
So from the point of using Bing Chat to try and lean a new topic I was very happy with the results.
My article - Python, Bing Chat & Astronomy- https://cr8ive.tk/?p=9541
Stellarium - https://stellarium-web.org/
Bing Chat Search - Bing AI - Search
Python Skyfield Astronomy library - https://rhodesmill.org/skyfield/
Python Astropy Astronomy library - https://docs.astropy.org/en/stable/
(Note you need to do pip install to install the above librariesd)
Julian Calendar Explanation-https://astronomy.swin.edu.au/cosmos/J/Julian+Calendar
Julian Calendar Converter -https://ssd.jpl.nasa.gov/tools/jdc/#/jd
Code: Skyfield library:

from skyfield.api import N, W, wgs84, load
import datetime
toPlanet = 'mars'
# toPlanet = 'sun'

ts = load.timescale()
t = ts.now() #+0.54166992

# Load the JPL ephemeris DE421 (covers 1900-2050).
planets = load('de421.bsp')
earth, otherPlanet = planets['earth'], planets[toPlanet]
wellington = earth + wgs84.latlon(-41.2963 * N, 174.7964 * W)
# wellington = earth + wgs84.latlon(-41.296337431067606 * N, 174.7964338376479 * W)
astrometric = wellington.at(t).observe(otherPlanet)
alt, az, d = astrometric.apparent().altaz()

now= datetime.datetime.now()

print(alt)
print(az)
print(d)
print(now)
print(t)


Code: Astropy library:

from astropy.coordinates import EarthLocation, AltAz, get_body
from astropy.time import Time
import astropy.units as u
import datetime

AstObject='sun' #
# AstObject='moon'
# AstObject='mars'
# Set up location and time Wellington (-41.2963 * N, 174.7964 * W)
location = EarthLocation(lat=-41.2963*u.deg, lon=174.7964*u.deg, height=10*u.m)
time = Time.now()
# Get coordinates of Jupiter
AstOb = get_body(AstObject, time)
# Calculate altitude and azimuth
altaz = AstOb.transform_to(AltAz(obstime=time, location=location))
altitude = altaz.alt.degree
azimuth = altaz.az.degree
distance = altaz.distance
now= datetime.datetime.now()
print(f"{AstObject} Altitude: {altitude:.2f} degrees")
print(f"{AstObject} Azimuth: {azimuth:.2f} degrees")
print(f'{AstObject} Distance: {distance}')
print(now)
print(time)

I hope this is of help to you, if so, can you please give a thumbs up for the video. Muchas Gracias Please visit my blog for similar topics: https://cr8ive.tk

Kind regards, Max Drake

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Python, Bing Chat & Astronomy», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.