Instructions for analysis and to reproduce the figures:

Note: These are minimalistic instructions. Please get in touch with me (deepakeappachen5@gmail.com) for more details. 


1a) We used ESO reflex, la cosmic and IRAF for cleaning, cosmic ray removal, astrometric correction and stacking - the wcs corrected, cosmic ray removed FORS images for XRT 210423 are given as xrt210423_astrometrycorrec.fits.


1b) we used the HiPERCAM pipeline to reduce the images. We used the la cosmic and IRAF for astrometric corrections, cosmic removal and stacking. The ugriz fits files are attached.

2) we found the zero point by comparing it with the PanSTARRS and SDSS Catalogues (zp.py is the script used, for FORS R band, we converted the PanSTARRS mags to R band using the  transformation_eqn_to_R_band.py)

3) For the artificial star experiment and PSF photometry, we used IRAF/Pyraf (python version 2.7). We modelled the PSF from the FORS and HiPERCAM images. (phot_pyraf_new.py was used for the artificial star experiment)
		- the PSF images: 
						  R: Rfors.fits.psf.1.fits
						  u: u.fits.psf.1.fits
						  g: g.fits.psf.1.fits
						  r: r.fits.psf.1.fits
						  i: i.fits.psf.1.fits
						  z: z.fits.psf.1.fits

		

5) For the photometry, we used the  SExtractor. 

6) For spectroscopy, we use XSHOOTER pipeline to obtain the cleaned 2D spectrum.
		TOO_hard-hostXRT210423_SCI_SLIT_FLUX_MERGE2D_NIR.fits
		TOO_hard-hostXRT210423_SCI_SLIT_FLUX_MERGE2D_VIS.fits

7) For SED fitting we used BAGPIPES. 
		The code used for SED fiiting: photz_bagpipes_n.py

		Note: We used the stantard filter profiles from http://svo2.cab.inta-csic.es/svo/theory/fps3/index.php?mode=browse&gname=GTC&gname2=HIPERCAM&asttype=astro



The codes and the necessary files required for reproducing the Figures are given.

Figure 1:

	plot_abell.py
	plot_n.py


Figure 2:
	XRT_210423.ipynb
	XRT_210423_pow.txt
	XRT_210423_HR.txt
	XRT_210423_model.txt
	
Figure 3:

	2dspec_plot_O3.py

Figure 4:

	Obtained by running the BAGPIPES code.

Figure 5:

	offset.py
	usING: comparison_offset_data.txt
	fong+22_deepak.txt

	and 

	sfr_mass.py
	usING: SNII.dat
	SNIc.dat
	SNIb.dat
	SGRBs_host_properties_fong.txt
	Schulze_host_properties.txt


Figure 6:
	OL_lightcurves.py
 	using: kilonova.csv
	SGRB_AG.dat
	SN_2008D.dat

