diff --git a/IDS/complete_IDS_CORSICA.m b/IDS/complete_IDS_CORSICA.m
index 2d3397ec784bcd56905402febff778ba67d916b8..33ed3fb117a90ed6e9bd13764b212fc7813d0129 100644
--- a/IDS/complete_IDS_CORSICA.m
+++ b/IDS/complete_IDS_CORSICA.m
@@ -1,16 +1,21 @@
-clear all
-close all
-clc
-
-% This script will complete the IDS of CORSICA with the missing fields recomputing the missing quantities from available information
-
-data_path_in = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510.mat';
-%path_IDS = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130506.mat';
-
-data_path_out = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510_extended_COCOS17.mat';
-
-% Load the IDS file
-IDS = load(data_path_in);
+doread = 0;
+dosave = 0;
+
+if doread
+  clear all
+  close all
+  clc
+
+  % This script will complete the IDS of CORSICA with the missing fields recomputing the missing quantities from available information
+
+  data_path_in = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510.mat';
+  %path_IDS = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130506.mat';
+  
+  data_path_out = '/NoTivoli/carpanes/LIU_RAP_ITER/CORSICA_ids/CORSICA_130510_extended_COCOS17.mat';
+  
+  % Load the IDS file
+  IDS = load(data_path_in);
+end
 
 %% Correct COCOS convention on original data
 
@@ -127,11 +132,13 @@ IDS.tf.b_field_tor_vacuum_r.data  = LXC.rBt;
 
 %% Convert from 11 to 17
 IDS.magnetics = ids_generic_cocos_nodes_transformation_symbolic(IDS.magnetics, 'magnetics', 11, 17);
-IDS.pf_active = ids_generic_cocos_nodes_transformation_symbolic(IDS.pf_active, 'pf_active', 11, 17);
+IDS.pf_active = ids_generic_cocos_nodes_transformation_symbolic(IDS.pf_active, 'pf_active', 11, 17,[],[],[],[],[],3);
 IDS.tf = ids_generic_cocos_nodes_transformation_symbolic(IDS.tf, 'tf', 11, 17);
 
 %% Store the resulting data
-save(data_path_out, '-struct', 'IDS')
-fprintf('\n wrote file %s \n', data_path_out);
+if dosave
+  save(data_path_out, '-struct', 'IDS')
+  fprintf('\n wrote file %s \n', data_path_out);
+end