twVolc / PyCamPermanent

Permanent PiCam (SO2) installation project software
GNU General Public License v3.0
1 stars 2 forks source link

Change units and column headings for output files #122

Closed ubdbra001 closed 1 month ago

ubdbra001 commented 2 months ago

Re-wrote the code to save the emission rates to a csv. Now starts by converting the existing EmissionRates object to a dataframe, and then performing all the subsequent operations on that. Maybe the emis_cols dictionary could be in a better place though?

ubdbra001 commented 2 months ago

How the output looks with the change: image

Note, that the values are truncated in this preview, but in the actual file they still have ~15 digits after the decimal point

twVolc commented 2 months ago

How the output looks with the change: image

Note, that the values are truncated in this preview, but in the actual file they still have ~15 digits after the decimal point

To be fair, we probably don't need to write to so many decimal places. 5 significant figures, or just a generic 3 decimal places, would be more than enough - the uncertainties in the data wiould always be much above this.

ubdbra001 commented 1 month ago

I think this is ready to go. I didn't split out the various flow calculations for calculate_emission_rate() here but I did add an issue (#125) to address it in the future. I put the new det_emission-rate_kgs() function in the Pyplis worker class. Not sure if that's the best place for it (it doesn't need access to any of the attributes or methods in the class so could just be a stand-alone function), if you think there's a better place do let me know. Also, I truncated all the values in the output to 3 decimal places.