PYTHON Astropy tutorial: How To Add Padding to 1D, 2D Array| FITS Image Processing| DESI ASTRO

preview_player
Показать описание
Padding in the context of 1D and 2D FITS (Flexible Image Transport System) images refers to the addition of extra pixels or elements around the edges of an image or data array. Padding is often used in image processing, particularly in operations like convolution or when resizing images, to control how the edges of the image are handled.

1D Image Padding
In a 1D FITS image, which is essentially a one-dimensional array of data (like a spectrum), padding might involve adding extra data points at the beginning or end of the array. For example, if you have a spectrum with 1000 data points, you might pad it with zeros to create a new array with 1024 data points. This is done to ensure compatibility with certain algorithms or to prepare the data for further processing.
2D Image Padding
In a 2D FITS image, which is a two-dimensional array of data (like a celestial image), padding typically involves adding extra rows or columns around the edges of the image. This is often used in convolution operations, where a filter is applied to the image, and padding helps maintain the original image size after the operation.

Types of Padding:

Zero Padding: Adds zeros around the image.
Reflect Padding: Reflects the edge values around the border.
Constant Padding: Adds a constant value around the image.
Replicate Padding: Repeats the edge values to pad the image.

Chapter TimeStamps:
00:00:00 Introduction To Padding
00:02:07 Padding 1D Array
00:08:05 FITS Image 2D Array Padding

SOME PYTHON BOOKS TO BUY:

Analyzing FITS data with Jupyter Notebooks, Python, and Astropy
---------------------------------------------------------------------------------------------------------
This tutorial on How to read FITS files using Astropy invokes insight into How to Read image data from Primary HDU and plot the Intensity value of each pixel. If you are an absolute beginner then this video will be very helpful for you.

Next, we will learn how to access the header information of the FITS file using the header attribute. The header contains essential information about the data in the file, such as the instrument used to collect the data, the observation date and time, and the exposure time.

We will also learn how to access the actual data in the FITS file using the data attribute. We can then manipulate and visualize the data using other Python libraries such as NumPy

Tables: FITS files can contain tabular data, such as catalogs of astronomical objects or measurement results from observations.
Overall, FITS files serve as a standardized and reliable means of storing and exchanging astronomical data, enabling researchers to analyze and interpret observations from a wide range of telescopes and instrument
Analyzing FITS data with Jupyter Notebooks, Python, and Astropy
How to Convert 1D array into 2D array in Python |For Absolute Beginner| Numpy
Python Basic Guassian fit from Scratch| Scipy Curve_fit| Matplotlib|Numpy
Python coding in astronomy(step by step) | handle FITS files | Astronomy grad explains
Python for Astronomy 3: Handling FITS files using Python
Рекомендации по теме