humlab-sead / sead_browser_client

Online browser client for the SEAD database
2 stars 0 forks source link

Magnetic susceptibility shows as weight #349

Closed MattiasSealander closed 7 months ago

MattiasSealander commented 7 months ago

Currently, in the spreadsheet view of magnetic susceptibility (MS) results show as weight (mg). See screenshot below. This is in the internal SuperSEAD browser for site ID 1.

Best is to show as only values with no unit indicator. Magnetic susceptibility is a measurement of a sample's...magnetic susceptibility. No better word for it.

bild

johanvonboer commented 7 months ago

Har kollat lite på detta nu. Jag gör ett par antaganden i JAS-servern (som levererar site-data) för de metoder där jag saknar unit_id. Koden ser ut så här:

//The below unit_id's which is hardcoded based on method_id is temporary - SHOULD be included in the db instead, so when it is, just remove this series of if-statements
if(methodId == 109) {
    //pH (H2O) - there's no unit for ph in the db atm
}
if(methodId == 107) {
    //µS (H2O) - something about conductivity
    //there doesn't seem to be any units for that fits, in the current sead db
}
if(methodId == 74) {
    //Total phosphates citric acid - assume it's ppm/micrograms
    method.unit_id = 18;
}
if(methodId == 37) {
    //Phosphate degrees - db says: "The amount of phosphate is specified as mg P2O5/100g dry soil.""
    method.unit_id = 17; //let's say it's just mg for now, which is true enough
}
if(methodId == 33) {
    //MS - assume the unit is milligrams
    method.unit_id = 17;
}
if(methodId == 32) {
    //LOI - assume the unit is a percentage
    method.unit_id = 23;
}

Så jag tar helt enkelt bort hårdkodningen av mg för method 33 (MS) då. Ser du någonting annat här som är ett galet antagande?

johanvonboer commented 7 months ago

Fix up on supersead