Close Menu
  • Home
  • AI
  • Big Data
  • Cloud Computing
  • iOS Development
  • IoT
  • IT/ Cybersecurity
  • Tech
    • Nanotechnology
    • Green Technology
    • Apple
    • Software Development
    • Software Engineering

Subscribe to Updates

Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

    What's Hot

    Laurence Fournier Beaudry and Guillaume Cizeron are on the brink of a controversial Olympic ice dance gold

    February 11, 2026

    iOS 26, using Swift, how can I group multiple Liquid Glass buttons into a single pill view?

    February 11, 2026

    One platform for the Agentic AI era

    February 11, 2026
    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    Big Tee Tech Hub
    • Home
    • AI
    • Big Data
    • Cloud Computing
    • iOS Development
    • IoT
    • IT/ Cybersecurity
    • Tech
      • Nanotechnology
      • Green Technology
      • Apple
      • Software Development
      • Software Engineering
    Big Tee Tech Hub
    Home»iOS Development»How to Install Astropy Python package on iOS?
    iOS Development

    How to Install Astropy Python package on iOS?

    big tee tech hubBy big tee tech hubJanuary 29, 2026012 Mins Read
    Share Facebook Twitter Pinterest Copy Link LinkedIn Tumblr Email Telegram WhatsApp
    Follow Us
    Google News Flipboard
    How to Install Astropy Python package on iOS?
    Share
    Facebook Twitter LinkedIn Pinterest Email Copy Link


    I am trying to run a Python script on my iPhone and iPad that uses the Astropy package. I have installed both Pythonista and Juno. Juno supposedly has it installed but I get errors from it. The script I am trying to run is pretty straight forward and below. It does run on a desktop so there are no bugs in it.

    import astropy.units as u
    from astropy.coordinates import EarthLocation, SkyCoord, AltAz
    from astropy.time import Time
    import requests
    
    
    def get_equatorial_coords():
        # 1. Define the Observer's Location: Roseville, California
        # Lat/Lon for Roseville, CA
       # location = EarthLocation(lat=38.7521*u.deg, lon=-121.2859*u.deg, height=50*u.m)
        try:
            # Use ip-api.com (free, no API key required for low volume)
            response = requests.get("
            data = response.json()
    
            if data['status'] == 'success':
                lat = data['lat']
                lon = data['lon']
                city = data['city']
                region = data['regionName']
    
                # Create the Astropy EarthLocation object
                # Note: height is set to 0 as IP geo usually doesn't provide altitude
                location = EarthLocation(lat=lat * u.deg, lon=lon * u.deg, height=0 * u.m)
        finally:
                print(f"Detected Location: {city}, {region}")
                print(f"Coordinates: {lat}, {lon}")
    
    
    #    location = get_location_by_ip()
        # 2. Get the current system time (UTC)
        current_time = Time.now()
    
        print(f"--- Observation Details ---")
        print(f"Location: Roseville, CA")
        print(f"System Time (UTC): {current_time}")
        print("-" * 27)
    
        # 3. Request Target Input from User
        try:
    
            user_az = float(input("Enter azimuth 0.0 to 180.0: "))
            user_alt = float(input("Enter altitude 0.0 to 90.0: "))
        except ValueError:
            print("Invalid input. Please enter numerical values.")
            return
    
        # 4. Create an AltAz frame for the specific time and location
        altaz_frame = AltAz(obstime=current_time, location=location)
    
        # 5. Define the target in the AltAz system
        target_altaz = SkyCoord(az=user_az*u.deg, alt=user_alt*u.deg, frame=altaz_frame)
    
        # 6. Transform to Equatorial Coordinates (ICRS/J2000)
        target_icrs = target_altaz.transform_to('icrs')
    
        print(f"\n--- Results ---")
        print(f"Right Ascension (RA): {target_icrs.ra.to_string(unit=u.hour, sep='hms')}")
        print(f"Declination (Dec):    {target_icrs.dec.to_string(unit=u.deg, sep='dms')}")
    
    
    
    
    if __name__ == "__main__":
        get_equatorial_coords()
    



    Source link

    Astropy Install iOS package Python
    Follow on Google News Follow on Flipboard
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Copy Link
    tonirufai
    big tee tech hub
    • Website

    Related Posts

    iOS 26, using Swift, how can I group multiple Liquid Glass buttons into a single pill view?

    February 11, 2026

    Python 3.14 with Łukasz Langa

    February 10, 2026

    The importance of human touch in AI-driven development – Donny Wals

    February 10, 2026
    Add A Comment
    Leave A Reply Cancel Reply

    Editors Picks

    Laurence Fournier Beaudry and Guillaume Cizeron are on the brink of a controversial Olympic ice dance gold

    February 11, 2026

    iOS 26, using Swift, how can I group multiple Liquid Glass buttons into a single pill view?

    February 11, 2026

    One platform for the Agentic AI era

    February 11, 2026

    An ice dance duo skated to AI music at the Olympics

    February 11, 2026
    About Us
    About Us

    Welcome To big tee tech hub. Big tee tech hub is a Professional seo tools Platform. Here we will provide you only interesting content, which you will like very much. We’re dedicated to providing you the best of seo tools, with a focus on dependability and tools. We’re working to turn our passion for seo tools into a booming online website. We hope you enjoy our seo tools as much as we enjoy offering them to you.

    Don't Miss!

    Laurence Fournier Beaudry and Guillaume Cizeron are on the brink of a controversial Olympic ice dance gold

    February 11, 2026

    iOS 26, using Swift, how can I group multiple Liquid Glass buttons into a single pill view?

    February 11, 2026

    Subscribe to Updates

    Get the latest technology news from Bigteetechhub about IT, Cybersecurity and Big Data.

      • About Us
      • Contact Us
      • Disclaimer
      • Privacy Policy
      • Terms and Conditions
      © 2026 bigteetechhub.All Right Reserved

      Type above and press Enter to search. Press Esc to cancel.