#Read the data redshift = catalogue_df.iloc[i]['z_{}'.format(color)] z_fits_file = fits_file.replace('.fits', '_z.fits') #Get file components CodeName, FileName, FileFolder = dz.Analyze_Address(fits_file) #IRAF task configuration dz.task_attributes['run folder'] = FileFolder dz.task_attributes['color'] = color dz.task_attributes['input'] = fits_file dz.task_attributes['output'] = z_fits_file dz.task_attributes['redshift'] = redshift dz.task_attributes['flux'] = 'yes' dz.run_iraf_task('dopcor') #Store file address in dataframe catalogue_df.iloc[i]['z{}_file'.format(color)] = z_fits_file #Load spectrum wave, flux, ExtraData = dz.get_spectra_data(fits_file) wave_z, flux_z, ExtraData_z = dz.get_spectra_data(z_fits_file) dz.data_plot(wave, flux, label = '{} {} arm'.format(CodeName, color)) dz.data_plot(wave_z, flux_z, label = '{} {} arm redshift corrected'.format(CodeName,color)) #Wording for the figure dz.FigWording(r'Wavelength $(\AA)$', 'Flux ' + r'$(erg\,cm^{-2} s^{-1} \AA^{-1})$', 'Redshift correction') #Store the figure