Exemple #1
0
print("Intensities files created")
##########################################################################################
# 7) Create .txt file with METADATA (for reproduction of results)
##########################################################################################
completepath = os.path.join(srcDir,
                            title + "_" + date + "_FreeDiff_metadata.txt")
MyFile2 = open(completepath, "w")
MyFile2.write("METADATA FILE LINKED TO THE FILE .txt NAMED:" + title + "_" +
              date + "_FreeDiff" + "\r\n")
MyFile2.write("\r\n")
MyFile2.write("Chosen ROIs for measurements (rectangular, in pixels): \r\n")
MyFile2.write("FRAP ROI: upper-left corner coordinates (x=" +
              str(roi_FRAP.getBounds().x) + ",y=" +
              str(roi_FRAP.getBounds().y) + "); width=" +
              str(roi_FRAP.getBounds().width) + "; Height=" +
              str(roi_FRAP.getBounds().height) + " \r\n")
MyFile2.write("Measured frap ROI: upper-left corner coordinates (x=" +
              str(MyRoi.getBounds().x) + ",y=" + str(MyRoi.getBounds().y) +
              "); width=" + str(MyRoi.getBounds().width) + "; Height=" +
              str(MyRoi.getBounds().height) + " \r\n")
MyFile2.write("Reference ROI: upper-left corner coordinates (x=" +
              str(roi_REF.getBounds().x) + ",y=" + str(roi_REF.getBounds().y) +
              "); width=" + str(roi_REF.getBounds().width) + "; Height=" +
              str(roi_REF.getBounds().height) + " \r\n")
MyFile2.write("BACKGROUND ROI: upper-left corner coordinates (x=" +
              str(roi_BACK.getBounds().x) + ",y=" +
              str(roi_BACK.getBounds().y) + "); width=" +
              str(roi_BACK.getBounds().width) + "; Height=" +
              str(roi_BACK.getBounds().height) + " \r\n")
MyFile2.close()
print("Metadata file created")