MTgeophysics / mtpy

Python toolbox for standard Magnetotelluric (MT) data analysis
GNU General Public License v3.0
147 stars 66 forks source link

merge GA version of modem related code with the geophysics version #9

Closed YingzhiGou closed 6 years ago

YingzhiGou commented 6 years ago

there are now more than 2 versions of ModEM related code in modeling package as the result of the big merge.

each version has there unique new functions and has been used in different part of the mtyp package.

Need to clean up the code.

Additionally, the original modem.py is 7000+ lines which are hard to manage. I''m thinking to convert the big source file into a package (named as ModEM) that consists different files where the object will reside. and use the package to mask the different file so that when the package is used, it will be something like

from mtpy.modeling.modem import Data

or

import mtpy.modeling.modem
...
md = modem.Data(...)

which should be consistent with the original syntax.

YingzhiGou commented 6 years ago

created branch issue#9

geojunky commented 6 years ago

@alkirkby @zhang01GA @YingzhiGou

Hi Yingzhi,

As we'd discussed in the last meeting, I think it's best to postpone this exercise for the time being. I think we should consult with both Jared (being the original author) and Alison first before we proceed.

Cheers, Rakib

YingzhiGou commented 6 years ago

I understand, but it is very difficult to compare the difference between a 7000+ lines source code and files that only contains one class. moving each class in that large file to its own file will help me to identify the differences of each object with diff tools and create isolated unit tests for each. so I will do this way during the merge.

if in the end Jared and Alison does not approve the new package structure, I can simply put the merged objects back into one large file

zhang01GA commented 6 years ago

@alkirkby @zhang01GA @YingzhiGou

Hi Rakib, thanks for the comments.

I had a chat with Yingzhi, He is trying to explore different but mutually compatible approaches. We shall talk with Alison tomorrow when she comes in.

The modem-related modules are very important, and has to be fixed as high priority task. Otherwise many scripts cannot run.