Lv1_ngc300_binning_DEPRECATED.py
def binned_text():
    """
    Given the MJDs, binned counts, and associated uncertainties, put them into a text file

    No arguments because I'll put all the bands in here
    """
    binned_pha_files,binned_MJD,binned_counts_soft1,binned_unc_soft1 = get_binned_data(soft1_dict,soft1_err_dict)
    binned_pha_files,binned_MJD,binned_counts_soft2,binned_unc_soft2 = get_binned_data(soft2_dict,soft2_err_dict)
    binned_pha_files,binned_MJD,binned_counts_A,binned_unc_A = get_binned_data(A_dict,A_err_dict)
    binned_pha_files,binned_MJD,binned_counts_B,binned_unc_B = get_binned_data(B_dict,B_err_dict)
    binned_pha_files,binned_MJD,binned_counts_C,binned_unc_C = get_binned_data(C_dict,C_err_dict)
    binned_pha_files,binned_MJD,binned_counts_D,binned_unc_D = get_binned_data(D_dict,D_err_dict)
    binned_pha_files,binned_MJD,binned_counts_inband,binned_unc_inband = get_binned_data(inband_dict,inband_err_dict)

    counts_file = Lv0_dirs.NGC300_2020 + 'n300_ulx.' + bgsub_type + '_cl50_g2020norm_' + bin_size + '.fffphot'
    output_file = open(counts_file,'w')

    ### get MJD (int), soft1, soft2, A, B, C, D, inband, all associated pha files
    for i in range(len(binned_MJD)):
        output_file.write(str(binned_MJD[i]) + ' ' + str(round(binned_counts_soft1[i],4)) + ' ' + str(round(binned_counts_soft2[i],4)) + ' ' + str(round(binned_counts_A[i],4)) + ' ' + str(round(binned_counts_B[i],4)) + ' ' + str(round(binned_counts_C[i],4)) + ' ' + str(round(binned_counts_D[i],4)) + ' ' + str(round(binned_counts_inband[i],4)) + ' ' + binned_pha_files[i] + '\n')
    output_file.close()

    unc_file = Lv0_dirs.NGC300_2020 + 'n300_ulx.' + bgsub_type + '_cl50_g2020err_norm_' + bin_size + '.fffphot'
    output_file = open(unc_file,'w')

    for i in range(len(binned_MJD)):
        output_file.write(str(binned_MJD[i]) + ' ' + str(round(binned_unc_soft1[i],4)) + ' ' + str(round(binned_unc_soft2[i],4)) + ' ' + str(round(binned_unc_A[i],4)) + ' ' + str(round(binned_unc_B[i],4)) + ' ' + str(round(binned_unc_C[i],4)) + ' ' + str(round(binned_unc_D[i],4)) + ' ' + str(round(binned_unc_inband[i],4)) + ' ' + binned_pha_files[i] + '\n')
    output_file.close()

    Given the MJDs, binned counts, and associated uncertainties, put them into a text file

    No arguments because I'll put all the bands in here
    
Given the MJDs, binned counts, and associated uncertainties, put them into a text file
No arguments because I'll put all the bands in here
Given the MJDs binned counts and associated uncertainties put them into a text file No arguments because I ' ll put all the bands in here
def binned_text():
    binned_pha_files,binned_MJD,binned_counts_soft1,binned_unc_soft1 = get_binned_data(soft1_dict,soft1_err_dict)
    binned_pha_files,binned_MJD,binned_counts_soft2,binned_unc_soft2 = get_binned_data(soft2_dict,soft2_err_dict)
    binned_pha_files,binned_MJD,binned_counts_A,binned_unc_A = get_binned_data(A_dict,A_err_dict)
    binned_pha_files,binned_MJD,binned_counts_B,binned_unc_B = get_binned_data(B_dict,B_err_dict)
    binned_pha_files,binned_MJD,binned_counts_C,binned_unc_C = get_binned_data(C_dict,C_err_dict)
    binned_pha_files,binned_MJD,binned_counts_D,binned_unc_D = get_binned_data(D_dict,D_err_dict)
    binned_pha_files,binned_MJD,binned_counts_inband,binned_unc_inband = get_binned_data(inband_dict,inband_err_dict)
    counts_file = Lv0_dirs.NGC300_2020 + 'n300_ulx.' + bgsub_type + '_cl50_g2020norm_' + bin_size + '.fffphot'
    output_file = open(counts_file,'w')
    for i in range(len(binned_MJD)):
        output_file.write(str(binned_MJD[i]) + ' ' + str(round(binned_counts_soft1[i],4)) + ' ' + str(round(binned_counts_soft2[i],4)) + ' ' + str(round(binned_counts_A[i],4)) + ' ' + str(round(binned_counts_B[i],4)) + ' ' + str(round(binned_counts_C[i],4)) + ' ' + str(round(binned_counts_D[i],4)) + ' ' + str(round(binned_counts_inband[i],4)) + ' ' + binned_pha_files[i] + '\n')
    output_file.close()
    unc_file = Lv0_dirs.NGC300_2020 + 'n300_ulx.' + bgsub_type + '_cl50_g2020err_norm_' + bin_size + '.fffphot'
    output_file = open(unc_file,'w')
    for i in range(len(binned_MJD)):
        output_file.write(str(binned_MJD[i]) + ' ' + str(round(binned_unc_soft1[i],4)) + ' ' + str(round(binned_unc_soft2[i],4)) + ' ' + str(round(binned_unc_A[i],4)) + ' ' + str(round(binned_unc_B[i],4)) + ' ' + str(round(binned_unc_C[i],4)) + ' ' + str(round(binned_unc_D[i],4)) + ' ' + str(round(binned_unc_inband[i],4)) + ' ' + binned_pha_files[i] + '\n')
    output_file.close()
def binned_text ( ) : binned_pha_files , binned_MJD , binned_counts_soft1 , binned_unc_soft1 = get_binned_data ( soft1_dict , soft1_err_dict ) binned_pha_files , binned_MJD , binned_counts_soft2 , binned_unc_soft2 = get_binned_data ( soft2_dict , soft2_err_dict ) binned_pha_files , binned_MJD , binned_counts_A , binned_unc_A = get_binned_data ( A_dict , A_err_dict ) binned_pha_files , binned_MJD , binned_counts_B , binned_unc_B = get_binned_data ( B_dict , B_err_dict ) binned_pha_files , binned_MJD , binned_counts_C , binned_unc_C = get_binned_data ( C_dict , C_err_dict ) binned_pha_files , binned_MJD , binned_counts_D , binned_unc_D = get_binned_data ( D_dict , D_err_dict ) binned_pha_files , binned_MJD , binned_counts_inband , binned_unc_inband = get_binned_data ( inband_dict , inband_err_dict ) counts_file = Lv0_dirs . NGC300_2020 + 'n300_ulx.' + bgsub_type + '_cl50_g2020norm_' + bin_size + '.fffphot' output_file = open ( counts_file , 'w' ) for i in range ( len ( binned_MJD ) ) : output_file . write ( str ( binned_MJD [ i ] ) + ' ' + str ( round ( binned_counts_soft1 [ i ] , 4 ) ) + ' ' + str ( round ( binned_counts_soft2 [ i ] , 4 ) ) + ' ' + str ( round ( binned_counts_A [ i ] , 4 ) ) + ' ' + str ( round ( binned_counts_B [ i ] , 4 ) ) + ' ' + str ( round ( binned_counts_C [ i ] , 4 ) ) + ' ' + str ( round ( binned_counts_D [ i ] , 4 ) ) + ' ' + str ( round ( binned_counts_inband [ i ] , 4 ) ) + ' ' + binned_pha_files [ i ] + '\n' ) output_file . close ( ) unc_file = Lv0_dirs . NGC300_2020 + 'n300_ulx.' + bgsub_type + '_cl50_g2020err_norm_' + bin_size + '.fffphot' output_file = open ( unc_file , 'w' ) for i in range ( len ( binned_MJD ) ) : output_file . write ( str ( binned_MJD [ i ] ) + ' ' + str ( round ( binned_unc_soft1 [ i ] , 4 ) ) + ' ' + str ( round ( binned_unc_soft2 [ i ] , 4 ) ) + ' ' + str ( round ( binned_unc_A [ i ] , 4 ) ) + ' ' + str ( round ( binned_unc_B [ i ] , 4 ) ) + ' ' + str ( round ( binned_unc_C [ i ] , 4 ) ) + ' ' + str ( round ( binned_unc_D [ i ] , 4 ) ) + ' ' + str ( round ( binned_unc_inband [ i ] , 4 ) ) + ' ' + binned_pha_files [ i ] + '\n' ) output_file . close ( )
Given the MJDs, binned counts, and associated uncertainties, put them into a text file
No arguments because I'll put all the bands in here
Given the MJDs binned counts and associated uncertainties put them into a text file No arguments because I ' ll put all the bands in here
"""
    Given the MJDs, binned counts, and associated uncertainties, put them into a text file

    No arguments because I'll put all the bands in here
    """ ### get MJD (int), soft1, soft2, A, B, C, D, inband, all associated pha files