openworm / tracker-commons

Compilation of information and code bases related to open-source trackers for C. elegans
11 stars 12 forks source link

dish vs arena #130

Closed ver228 closed 7 years ago

ver228 commented 7 years ago

It seems that the python and scala implementation differ in the name of the field refering to "the place where the worm is being recorded".

In the scala implementation and in WCON_format.md it is refered as arena while in the python implementation and in the wcon_schema.json it is refered as dish. Additionally, there is a problem on where to add the image_orientation field.

For what I understand the json schema for scala is:

"arena": {
    "kind": "object",
    "diameter": {"oneOf": [
                {"type": "number"}
                {["type": "array", "minItems":2, "maxItems":2, "items":{"type":number}]}
                ],
    "orient": {"type": "string"} 
    }
}

"orient" prefered values are "toward" and "away" but anything is valid.

The equivalent for python taken from wcon_schema.json is:

 "metadata": {
    "properties": {
        "dish": {
            "type": "object",
            "properties":{
                "type": {"type": "string", "default":"petri"},
                "size": {"type": "number"},
                "units": {"type": "string"}
            }
        },
        "image_orientation": {"type": "string", "enum": ["imaged onto agar", "imaged through agar"]}
    }
}

As you can see they are quite different. Personally, I think i would prefer the scala implementation. It seems more flexible.

MichaelCurrie commented 7 years ago

Thanks for pointing this out @ver228. I will change the Python version to the preferred "arena" terminology for release 1.2.0.

Ichoran commented 7 years ago

I updated the JSON schema to reflect the "arena" naming in #146

MichaelCurrie commented 7 years ago

I updated all the tests. There is no processing code that does anything with "arena", it's just a metadata field, so there is nothing else that needs to be done for Python. I've also done a repo-wide search and made a few more search-replaces to some Octave tests that used "dish". That removes the last vestiges, I believe.

068d8462fc8909bbb2b5ef0106777c64567cb9bc

Ichoran commented 7 years ago

Great, thanks :)