From 753fe29502a39d41500500e580ad1694609f7440 Mon Sep 17 00:00:00 2001 From: Clemens Barth Date: Fri, 8 Apr 2022 22:21:14 +0200 Subject: [PATCH] KPFM 2 omega signal 'KPFM_2w'. It is an added signal in list of channels. Nanonis adaption. --- AFM_thumbs/Channel.py | 49 ------------------ AFM_thumbs/Config_default.conf | 15 +++++- AFM_thumbs/SPECS_Nanonis.py | 5 +- AFM_thumbs/Variables.py | 3 +- AFM_thumbs/__pycache__/Channel.cpython-38.pyc | Bin 6701 -> 6693 bytes .../__pycache__/SPECS_Nanonis.cpython-38.pyc | Bin 16052 -> 16075 bytes .../__pycache__/Variables.cpython-38.pyc | Bin 13774 -> 13798 bytes 7 files changed, 18 insertions(+), 54 deletions(-) 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 b78e13b5ccc36a4c6d4b7d4ba17e8dadbeab6d0c..0a2de3668461b83ee9e9eeff2f5e944320a279cf 100644 GIT binary patch delta 592 zcmZ2$vebkxl$V!_0SNX^2}t^8vytx?Gh_Z_PL{~YSu7^1i~>N&#{?n~kdKKEB+4iR z#hVYah_J-_1I;MT0ht7p7Gh)pVh*4JWHwAx04y&Clm{6q22=}SqqErHvTRJ7%{VtQ zM|XlO$-uA#W-!7sh!r3w5N&}IuRL?~L1HaHwhGv*)<7c80_;{z<`V5>G}}Byw39j7o)Kta7KVi!j9k$8!DI;lWw?M46wM$SnZ*Ma V<6)d!A-RfMi^Gb;0tjt6I03NgEUEwi delta 613 zcmZ2#vetwzl$V!_0SNk*$t9@UZshyL%ve5|lO>WPzM!%sBR|i0auSP)Dw6=C03#oh z0EmWRARj0KB!!@O^KKRqmiTa>VZ}KhBboRZg&0|Ym;=Z{X2V1U!17{1d64m9K(!Dy zI*Sb`4-sQy-mJ&DkvV!M$dU{UOJD{gEQ449astcR1uikCN-_d{QUvyi03#108xXUg1ROR$;kE>~b(1AUix}fK_lR~fM`wU6 y&BCyhgOQ7o0~D=55}hRg7UKfS3IOFm5W(Vsi}5f`E|6TsZN%Zk;Q)kg9Gn0ax-l;R diff --git a/AFM_thumbs/__pycache__/SPECS_Nanonis.cpython-38.pyc b/AFM_thumbs/__pycache__/SPECS_Nanonis.cpython-38.pyc index ac5ba7678195397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