diff --git a/AFM_thumbs/Channel.py b/AFM_thumbs/Channel.py index 1491ec8..a1da9b2 100755 --- a/AFM_thumbs/Channel.py +++ b/AFM_thumbs/Channel.py @@ -38,34 +38,26 @@ def rename_channel(name): if re.search(ID_list[0],name): globvar_AFMdata.channel.append("Topography") - elif re.search(ID_list[4],name): if re.search(ID_list[5],name): globvar_AFMdata.channel.append("filtered df") else: globvar_AFMdata.channel.append("df") - elif re.search(ID_list[1],name): globvar_AFMdata.channel.append("Amplitude") - elif re.search(ID_list[6],name): globvar_AFMdata.channel.append("Dissipation") - elif re.search(ID_list[2],name): if re.search(ID_list[3],name): globvar_AFMdata.channel.append("Kelvin Error") else: globvar_AFMdata.channel.append("Kelvin") - elif re.search(ID_list[8],name): globvar_AFMdata.channel.append("Ext 1") - elif re.search(ID_list[9],name): globvar_AFMdata.channel.append("Ext 2") - elif re.search(ID_list[7],name): globvar_AFMdata.channel.append("Excitation") - elif re.search(ID_list[10],name): globvar_AFMdata.channel.append("Phase") else: @@ -91,51 +83,43 @@ def proceed_with(image_nr,direction): return True elif direction == "backward" and globvar_ThumbPara.thumbs[1]: return True - elif globvar_AFMdata.channel[image_nr] == "df": if not globvar_AFMdata.channel[image_nr] == "filtered": if direction == "forward" and globvar_ThumbPara.thumbs[2]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[3]: return True - elif globvar_AFMdata.channel[image_nr] == "Dissipation": if direction == "forward" and globvar_ThumbPara.thumbs[4]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[5]: return True - elif globvar_AFMdata.channel[image_nr] == "Amplitude": if direction == "forward" and globvar_ThumbPara.thumbs[6]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[7]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin": if not globvar_AFMdata.channel[image_nr] == "Error": if direction == "forward" and globvar_ThumbPara.thumbs[8]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[9]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin Error": if direction == "forward" and globvar_ThumbPara.thumbs[10]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[11]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 1": if direction == "forward" and globvar_ThumbPara.thumbs[12]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[13]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 2": if direction == "forward" and globvar_ThumbPara.thumbs[14]: return True elif direction == "backward" and globvar_ThumbPara.thumbs[15]: return True - else: for i, chan in enumerate(globvar_ThumbPara.channel_names): if not chan == "": @@ -157,49 +141,41 @@ def line_fit(image_nr,direction): return True elif direction == "backward" and globvar_ThumbPara.line_fit[1]: return True - elif globvar_AFMdata.channel[image_nr] == "df": if direction == "forward" and globvar_ThumbPara.line_fit[2]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[3]: return True - elif globvar_AFMdata.channel[image_nr] == "Dissipation": if direction == "forward" and globvar_ThumbPara.line_fit[4]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[5]: return True - elif globvar_AFMdata.channel[image_nr] == "Amplitude": if direction == "forward" and globvar_ThumbPara.line_fit[6]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[7]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin": if direction == "forward" and globvar_ThumbPara.line_fit[8]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[9]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin Error": if direction == "forward" and globvar_ThumbPara.line_fit[10]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[11]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 1": if direction == "forward" and globvar_ThumbPara.line_fit[12]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[13]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 2": if direction == "forward" and globvar_ThumbPara.line_fit[14]: return True elif direction == "backward" and globvar_ThumbPara.line_fit[15]: return True - else: for i, chan in enumerate(globvar_ThumbPara.channel_names): if not chan == "": @@ -221,49 +197,41 @@ def plane_fit(image_nr,direction): return True if direction == "backward" and globvar_ThumbPara.plane_fit[1]: return True - elif globvar_AFMdata.channel[image_nr] == "df": if direction == "forward" and globvar_ThumbPara.plane_fit[2]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[3]: return True - elif globvar_AFMdata.channel[image_nr] == "Dissipation": if direction == "forward" and globvar_ThumbPara.plane_fit[4]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[5]: return True - elif globvar_AFMdata.channel[image_nr] == "Amplitude": if direction == "forward" and globvar_ThumbPara.plane_fit[6]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[7]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin": if direction == "forward" and globvar_ThumbPara.plane_fit[8]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[9]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin Error": if direction == "forward" and globvar_ThumbPara.plane_fit[10]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[11]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 1": if direction == "forward" and globvar_ThumbPara.plane_fit[12]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[13]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 2": if direction == "forward" and globvar_ThumbPara.plane_fit[14]: return True if direction == "backward" and globvar_ThumbPara.plane_fit[15]: return True - else: for i, chan in enumerate(globvar_ThumbPara.channel_names): if not chan == "": @@ -285,55 +253,46 @@ def invert(image_nr,direction): direction = "forward" elif image_nr%2 != 0: direction = "backward" - if globvar_AFMdata.channel[image_nr] == "Topography": if direction == "forward" and globvar_ThumbPara.invert[0]: return True if direction == "backward" and globvar_ThumbPara.invert[1]: return True - elif globvar_AFMdata.channel[image_nr] == "df": if direction == "forward" and globvar_ThumbPara.invert[2]: return True if direction == "backward" and globvar_ThumbPara.invert[3]: return True - elif globvar_AFMdata.channel[image_nr] == "Dissipation": if direction == "forward" and globvar_ThumbPara.invert[4]: return True if direction == "backward" and globvar_ThumbPara.invert[5]: return True - elif globvar_AFMdata.channel[image_nr] == "Amplitude": if direction == "forward" and globvar_ThumbPara.invert[6]: return True if direction == "backward" and globvar_ThumbPara.invert[7]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin": if direction == "forward" and globvar_ThumbPara.invert[8]: return True if direction == "backward" and globvar_ThumbPara.invert[9]: return True - elif globvar_AFMdata.channel[image_nr] == "Kelvin Error": if direction == "forward" and globvar_ThumbPara.invert[10]: return True if direction == "backward" and globvar_ThumbPara.invert[11]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 1": if direction == "forward" and globvar_ThumbPara.invert[12]: return True if direction == "backward" and globvar_ThumbPara.invert[13]: return True - elif globvar_AFMdata.channel[image_nr] == "Ext 2": if direction == "forward" and globvar_ThumbPara.invert[14]: return True if direction == "backward" and globvar_ThumbPara.invert[15]: return True - else: for i, chan in enumerate(globvar_ThumbPara.channel_names): if not chan == "": @@ -364,49 +323,41 @@ def select_color(image_nr,direction): direction = "forward" elif image_nr%2 != 0: direction = "backward" - if globvar_AFMdata.channel[image_nr] == "Topography": if direction == "forward": return globvar_ThumbPara.colors[0] if direction == "backward": return globvar_ThumbPara.colors[1] - elif globvar_AFMdata.channel[image_nr] == "df": if direction == "forward": return globvar_ThumbPara.colors[2] if direction == "backward": return globvar_ThumbPara.colors[3] - elif globvar_AFMdata.channel[image_nr] == "Dissipation": if direction == "forward": return globvar_ThumbPara.colors[4] if direction == "backward": return globvar_ThumbPara.colors[5] - elif globvar_AFMdata.channel[image_nr] == "Amplitude": if direction == "forward": return globvar_ThumbPara.colors[6] if direction == "backward": return globvar_ThumbPara.colors[7] - elif globvar_AFMdata.channel[image_nr] == "Kelvin": if direction == "forward": return globvar_ThumbPara.colors[8] if direction == "backward": return globvar_ThumbPara.colors[9] - elif globvar_AFMdata.channel[image_nr] == "Kelvin Error": if direction == "forward": return globvar_ThumbPara.colors[10] if direction == "backward": return globvar_ThumbPara.colors[11] - elif globvar_AFMdata.channel[image_nr] == "Ext 1": if direction == "forward": return globvar_ThumbPara.colors[12] if direction == "backward": return globvar_ThumbPara.colors[13] - elif globvar_AFMdata.channel[image_nr] == "Ext 2": if direction == "forward": return globvar_ThumbPara.colors[14] diff --git a/AFM_thumbs/Config_default.conf b/AFM_thumbs/Config_default.conf index 80731b1..8a2b1f0 100644 --- a/AFM_thumbs/Config_default.conf +++ b/AFM_thumbs/Config_default.conf @@ -48,13 +48,14 @@ File extension : Direction : 0 Linefit : 3 Planefit : 3 -AddChannel : 20 -ChannelNumber : 4 +AddChannel : 22 +ChannelNumber : 5 Tooltips : 0 Channelname 1 : FN Channelname 2 : FL Channelname 3 : I Channelname 4 : Phase +Channelname 5 : KPFM_2w Thumb 1 : 1 Thumb 2 : 1 Thumb 3 : 1 @@ -79,6 +80,8 @@ Thumb 21 : 1 Thumb 22 : 1 Thumb 23 : 1 Thumb 24 : 1 +Thumb 25 : 1 +Thumb 26 : 1 LineFit 1 : 1 LineFit 2 : 1 LineFit 3 : 1 @@ -103,6 +106,8 @@ LineFit 21 : 1 LineFit 22 : 1 LineFit 23 : 1 LineFit 24 : 1 +LineFit 25 : 1 +LineFit 26 : 1 PlaneFit 1 : 0 PlaneFit 2 : 0 PlaneFit 3 : 0 @@ -127,6 +132,8 @@ PlaneFit 21 : 0 PlaneFit 22 : 0 PlaneFit 23 : 0 PlaneFit 24 : 0 +PlaneFit 25 : 0 +PlaneFit 26 : 0 Inverted 1 : 0 Inverted 2 : 0 Inverted 3 : 1 @@ -151,6 +158,8 @@ Inverted 21 : 0 Inverted 22 : 0 Inverted 23 : 0 Inverted 24 : 0 +Inverted 25 : 0 +Inverted 26 : 0 Color 1 : Gist_heat Color 2 : Gist_heat Color 3 : Grey @@ -175,3 +184,5 @@ Color 21 : Ocean Color 22 : Ocean Color 23 : Grey Color 24 : Grey +Color 25 : Grey +Color 26 : Grey diff --git a/AFM_thumbs/SPECS_Nanonis.py b/AFM_thumbs/SPECS_Nanonis.py index 1456ef6..6e10694 100755 --- a/AFM_thumbs/SPECS_Nanonis.py +++ b/AFM_thumbs/SPECS_Nanonis.py @@ -198,7 +198,6 @@ def read_SPECS_Nanonis_image_data(nanonis_file): # The channels with the following names are not supported. # # Bias - # Laser_power_mon. # Laser_Setpoint # Output_3 # Output_4 @@ -206,7 +205,6 @@ def read_SPECS_Nanonis_image_data(nanonis_file): # Y # Output_8 channels_not_supported = ["Bias", - "Laser_power_mon.", "Laser_Setpoint", "Output_3", "Output_4", @@ -246,6 +244,8 @@ def read_SPECS_Nanonis_image_data(nanonis_file): channel_name = "Kelvin" if channel_name == "KPFM_err": channel_name = "KELVIN_ERR" + if channel_name == "Laser_power_mon.": + channel_name = "KPFM_2w" globvar_AFMdata.scandir.append("forward") globvar_AFMdata.scandir.append("backward") @@ -326,6 +326,7 @@ def prepare_SPECS_Nanonis_images(nanonis_file, data_offset): # The definition 'proceed_with' is 'connected' with the GUI of # AFM_thumbs where one can choose if a channel of a specific # scanning direction shall be represented in a pdf file or not. + if proceed_with(image_nr,globvar_AFMdata.scandir[image_nr]): # Prepare the file path. diff --git a/AFM_thumbs/Variables.py b/AFM_thumbs/Variables.py index 6714cfb..7ad44c9 100755 --- a/AFM_thumbs/Variables.py +++ b/AFM_thumbs/Variables.py @@ -288,7 +288,8 @@ ID_abbreviations = {"Topography" : "Z", "filtered df":"df_fil", "Amplitude":"A", "Dissipation": "D", "Kelvin Error": "KPFM_err", "Ext 1": "Ext1", "Ext 2": "Ext2", "Excitation": "A_ext", "Phase": "Phase", "Kelvin": "KPFM", "DF_DIG": "df", - "EXT": "Ext", "EXT1": "Ext1", "EXT2": "Ext2"} + "EXT": "Ext", "EXT1": "Ext1", "EXT2": "Ext2", + "Kelvin_2w": "KPFM2w"} # ______________________________________________________________________ Colors diff --git a/AFM_thumbs/__pycache__/Channel.cpython-38.pyc b/AFM_thumbs/__pycache__/Channel.cpython-38.pyc index b78e13b..0a2de36 100644 Binary files a/AFM_thumbs/__pycache__/Channel.cpython-38.pyc and b/AFM_thumbs/__pycache__/Channel.cpython-38.pyc differ diff --git a/AFM_thumbs/__pycache__/SPECS_Nanonis.cpython-38.pyc b/AFM_thumbs/__pycache__/SPECS_Nanonis.cpython-38.pyc index ac5ba76..be550d8 100644 Binary files a/AFM_thumbs/__pycache__/SPECS_Nanonis.cpython-38.pyc and b/AFM_thumbs/__pycache__/SPECS_Nanonis.cpython-38.pyc differ diff --git a/AFM_thumbs/__pycache__/Variables.cpython-38.pyc b/AFM_thumbs/__pycache__/Variables.cpython-38.pyc index 193992b..df4c001 100644 Binary files a/AFM_thumbs/__pycache__/Variables.cpython-38.pyc and b/AFM_thumbs/__pycache__/Variables.cpython-38.pyc differ