simpeg / aurora

software for processing natural source electromagnetic data
MIT License
13 stars 2 forks source link

Extraction of Remote Reference Site ID from TF XML #269

Closed kkappler closed 1 year ago

kkappler commented 1 year ago

relates to #252 @laura-iris : Working through your scripts on earthscope_tests branch, I am not finding the code for extracting the remote reference station id from the xml. there was a prototype method in example_workflow.py, which I factored into helpers.py in aurora/aurora/test_utils/earthscope

Here is an example xml

that indicates that the remote reference site is: ORG08 (under the ProcessingInfo > RemoteInfo > xml hierarchy.

Can you take a look and see if the mt_metadata tf object can access this programatically .. I think you had a way to do this ..

FWIW I ran the get_remotes_from_tf() method in helpers.py on all the xml files and in zero cases did anything but an empty list come back. If we cannot extract the info with the tf object then we'll need to file a issue in mt_metdata to request this functionality

kkappler commented 1 year ago

@laura-iris :

I see there is an alternative version of this method:


def get_remotes_from_tf(spud_tf):
    attr_name = "transfer_function.remote_references"
    remote_references = spud_tf.station_metadata.get_attr_from_name(attr_name)
    remotes = list()
    for remote_station in remote_references:
        if not len(remote_station.split('-')) > 1:
            #if remote_station != station:
            remotes.append(remote_station)

    print(remote_references)
    print(remotes)
    return remotes

It seems to be yielding results -- I will look into this and update the issue

kkappler commented 1 year ago

We are getting the remotes using the above function. Closing this for now. It may be reopened pending discussion Friday