Closed alkirkby closed 5 years ago
I agree, we need to create a new branch for a proper refactoring; perhaps after merging imaging2 to develop?
Sounds good to me.
Some additional modules with duplicated functionality:
modeling/modem/plot_response.py & imaging/plot_response.py
I've started working on consolidating functionality in the following files:
1. imaging/modem_phase_tensor_maps.py () This is the longest file with the most recent updates and I am thinking of refactoring the flexible functionality in 2 into this file
2. imaging2/modem_ptensors (in branch imaging2) Could be deleted altogether once functionality is refactored into 1
3. modeling/modem/plot_pt_maps.py This file is shorted than 1, which has 3 more functions, but it contains changes brought over from the AK branch, which is presumably not the case with 1
4. modeling/modem_data_to_phase_tensor.py
This is a small driver file that calls the Data
class and can be moved to legacy
We need to have a chat about whether this would be a reasonable way forward.
Created a new branch consolidate_modem_vis
Completed consolidating functionalities related to visualization of phase tensors and ModEM slices.
modem_phase_tensor_maps.py
now contains functionality refactored from modem_ptensors.py
and plot_pt_maps.py
; the latter two have been moved to legacy
plot_slices.py
now contains functionality refactored from plot_depth_slice.py
and modem_slice.py
. Additional functionality implemented includes ability to interactively select ranges of Cartesian axis-aligned slices (as below) and export them as png/pdf
I’ve just noticed there are four python scripts in mtpy to deal with reading, writing and visualising each of phase tensors and slices from modem:
imaging/modem_phase_tensor_maps.py imaging2/modem_ptensors (in branch imaging2) modeling/modem_data_to_phase_tensor.py modeling/modem/plot_pt_maps.py
imaging2/modem_slice.py (in branch imaging2) modeling/modem_output_to_views.py modeling/modem/plot_depth_slice.py modeling/modem/plot_slices.py
I am thinking that we need to try and consolidate some of these as it appears to me that they have similar functionality. I wondered if we should think about putting together a new module in imaging or imaging2 called modem (similar to the modem module in modeling)? Or we could put it all in the existing modem module? We might need to look at the code itself too, to see if there is any duplicated functionality.