Astropy Lesson 1: Introduction to FITS File Handling

Поділитися
Вставка
  • Опубліковано 17 вер 2024
  • This is the first in a series of videos where I will be teaching you how to use Astropy on Linux, Windows, or macOS. In this video, I cover the basics of which programs you'll need, and how to open and view the data stored in FITS image files.
    SOFTWARE
    Visual Studio Code ............ code.visualstu...
    Python ................................ www.python.org...
    Having trouble finding FITS files to work with? Find some here: archive.stsci....
    EXAMPLE CODE
    Here's a link to my GitHub repository with sample Astronomy codes. Download 'L1_fits-handling.ipynb' for the code used in this video: github.com/lai...
    ACKNOWLEDGEMENT
    This work made use of Astropy (www.astropy.org) a community-developed core Python package and an ecosystem of tools and resources for astronomy (Astropy, 2013, 2018, 2022).

КОМЕНТАРІ • 35

  • @vtron9832
    @vtron9832 Рік тому +4

    I have begun undergraduate research with astropy and photutils for photometric data analysis. These videos are helpful!

  • @sphere1980
    @sphere1980 Рік тому +1

    I like it Man , looking forward for the next video please continue.

    • @mic_n_ike
      @mic_n_ike  Рік тому +1

      Glad you liked it! It might be awhile before I can get the next video out, but it’s in the works :)

  • @adarshthecuriousone1392
    @adarshthecuriousone1392 Рік тому +1

    great help !! looking forward for next videos

  • @nafisshyan3995
    @nafisshyan3995 Рік тому +1

    i like it man ! hope you continue it

  • @marinajacobo3550
    @marinajacobo3550 9 місяців тому +1

    This is awesome! Thank you Micah

  • @qihanzou9244
    @qihanzou9244 Рік тому +1

    Your video is so great. Thank you so much!

  • @StellarViewSpace
    @StellarViewSpace 2 місяці тому

    Thanks soo much for the tutorial, your channel is awesome 👍

  • @DrakshaShaikh
    @DrakshaShaikh 2 місяці тому

    Please make more such videos on fits and data reduction

  • @rverm1000
    @rverm1000 7 місяців тому +3

    the volume is to low. cant hear you

    • @mic_n_ike
      @mic_n_ike  7 місяців тому

      I’m sorry about that. Have you tried turning up the volume on your speakers/ headphones?

    • @oeq57
      @oeq57 Місяць тому +1

      I agree very low volume. I have tried on multiple devices with 100% volume

  • @AngelRaulRecio
    @AngelRaulRecio 5 місяців тому

    Micah!
    It's jhoooon marstooon!

    • @mic_n_ike
      @mic_n_ike  4 місяці тому

      Hello, jhooon marstooon!! 👋

  • @aminatrabelsi423
    @aminatrabelsi423 Рік тому +1

    thank you for this video it helps me a lot , but i have a question , can astropy fit light curves using spectral models ? please answer me

    • @mic_n_ike
      @mic_n_ike  Рік тому

      Hi! Sorry I haven't replied to your comment--I just moved apartments, and haven't had much time to upkeep my channel! You can use the Gammapy package to model light curves. Here's a link to a tutorial that might be useful: docs.gammapy.org/0.9/notebooks/light_curve.html hope this helps!

  • @AlexWatson-e9s
    @AlexWatson-e9s 2 дні тому

    why you not add NGC 2323 ? can you provide this data ?

  • @trishamayeareola7024
    @trishamayeareola7024 Рік тому

    Good day sir! I would like to ask about where you downloaded the fits file. I tried downloading mine at MAST yet it says "none" when I tried the image_data part. Thank you!

    • @mic_n_ike
      @mic_n_ike  11 місяців тому

      I found mine here archive.stsci.edu/prepds/hugs/

  • @Orange-qc6ub
    @Orange-qc6ub 7 місяців тому

    I've tried doing this with jpeg images that I converted to FITS but apparently they're only a "RGB" images so trying to submit only a length and height alone does not work. In particular I was looking for a way to make the y-axis display anything other than a zero height while the x-axis displayed just fine. And when I pass values in the image_data brackets theres three of them that need to put in.

    • @mic_n_ike
      @mic_n_ike  4 місяці тому +1

      It sounds like your fits image may be corrupted or is not formatted in a way that Astropy expects. Astropy expects images in a 2D array, not RGB images. I would suggest finding a fits image that has been prepared for data extraction rather than converting a jpeg into a fits image yourself.

    • @Orange-qc6ub
      @Orange-qc6ub 4 місяці тому

      @@mic_n_ike If I wanted to prepare images for data extraction myself would that be possible.

    • @mic_n_ike
      @mic_n_ike  4 місяці тому

      @@Orange-qc6ub that depends on what you’re trying to do. If you’re talking about taking a regular jpeg and making it into something that can be manipulated with Astropy, that process would be very involved, and I don’t think I would know exactly how to do it. Fits files contain something called a header, which is a very messy text block. You would probably need to make the header up by hand, because a jpeg would not have one. You would also have to find some way to transform the RGB jpeg into a 2D array.

  • @ananyaghosh6592
    @ananyaghosh6592 4 місяці тому

    it's asking for license in windows to set up visual studio Code,I'm so confused what should I do

    • @mic_n_ike
      @mic_n_ike  4 місяці тому +1

      You shouldn’t need a license to use VS code, it is an open source software. Please ensure that you are installing the correct application. You can follow the link in the video description to the official download page, or if you are running Windows 11 you can install VS code directly from the Microsoft store. Additionally, please ensure that you are running a legitimate version of windows.

    • @ananyaghosh6592
      @ananyaghosh6592 3 місяці тому

      @@mic_n_ike it's showing,pip is not recognized as a file,..

    • @mic_n_ike
      @mic_n_ike  3 місяці тому

      @@ananyaghosh6592 at what point does it say “pip is not recognized as a file?”

  • @lunthangify
    @lunthangify Рік тому

    I am not clear as to where or in which folder or directory should i save the downloaded FITS file?

    • @mic_n_ike
      @mic_n_ike  Рік тому +1

      It doesn’t matter where you download the fits file, all that matters is that your fits file and your Jupyter notebook are saved in the same folder on your computer :)

    • @lunthangify
      @lunthangify Рік тому

      @@mic_n_ike thanks.

  • @rverm1000
    @rverm1000 7 місяців тому

    i cant get the code to read the fits file properly

    • @mic_n_ike
      @mic_n_ike  7 місяців тому

      This is a common issue. Make sure both the Jupyter notebook and the FITS file are saved in your working folder. The FITS file can be saved in a subdirectory within your working folder, but if this is the case, you must include the sub folder name when calling the fits file. For example, if your working folder is “ASTRONOMY” and you have your fits file saved in a folder called “FITS_FILES”, you must make sure your Jupyter notebook is saved directly under “ASTRONOMY” and that the folder “FITS_FILES” is also saved under “ASTRONOMY”. Then, to open your fits file, type “fits.open(“FITS_FILES/ngc1261.fits”)”

    • @rverm1000
      @rverm1000 7 місяців тому

      @mic_n_ike I'm using pycharm . Yes the file is in the working folder.

    • @rverm1000
      @rverm1000 7 місяців тому

      @@mic_n_ike but the problem is it is compressed.

    • @mic_n_ike
      @mic_n_ike  7 місяців тому

      @@rverm1000 I’m afraid I’m not familiar with PyCharm, but it sounds like you might just need to extract the downloaded fits file with a program like 7zip