Although the use of analyzers in and is very similar, being aware of some of the differences may be helpful with the conversion process. For example some of the class and method names are different, as seen in the following diagram:
/diagrams/analyzers-convert.puml
As the previous diagram illustrates the methods, :pyselect_simulation_data
and :pyfinalize
, have been renamed to :pymap
and :pyreduce
in ; however, the parameters are the same:
select_simulation_data(self,data,simulation)
map(self,data,simulation)
finalize(self,all_data)
reduce(self,all_data)
For additional information about the IAnalyzer class and methods, see :py~idmtools.entities.ianalyzer.IAnalyzer
.
In addition, you can also see an example of a .csv analyzer created in and how it was converted to . Other than the class name and some method names changing the core code is almost the same. The primary differences can be seen in the class import statements and the execution of the analysis within the if __name__ == '__main__': block of code.
analyzers-convert-dtk analyzers-convert-idmt