vedant agrawal([email protected])
devansh gupta([email protected])
Renu([email protected])
The code that we have uploaded is a Flask web application that takes two FITS files as input, processes them, and renders the result in a browser. The processing steps include:
Open the FITS files using the astropy.io library, get the data and shape of the images.
Scale the data of both images to the same scale using MinMaxScaler from the sklearn library.
Crop both images to the same size if their shapes are different.
Create a green channel by averaging the red and blue channels.
Create a RGB image from the red, green and blue channels.
Display the RGB image using matplotlib's imshow function.
Mirror the data of both images.
Subtract the background of both images using 'sep' library
Extract sources from the background subtracted images.
Find the target flux of the sources in both images.
Calculate the temperature of the sources using the flux values.
formulae that we used was ballesteros formula.
Create a scatter plot of the sources using matplotlib.
Plot the temperature of the sources on the scatter plot using the matplotlib's annotate function.
Show the scatter plot using matplotlib's show function.
Return the image to the browser using the flask's render_template function
There multiple hurdles to overcome, in the implementation side it was difficult to come up with a method to identify stars in the image and then calculate tempereature of the star. we finally used the ballesteros formula to get the temperature of the star from the color index of the star. On the web tool part of the solution it was a bit complicated to render temperatures when hovered upon a star so we finally instead rendered multiple plots with identified stars and their temperatures.
To run this on local machine:
- Download the zip file of the code
- Install the necessary dependencies:
pip install flaskpip install seppip install astropy.iopip install sklearn - Finally run the project by the running the command
python app.py