Comments (6)
Ok, come si diceva i problemi sono due:
- Se il troncamento sia un comportamento accettabile (rispetto ad es. all'arrotondamento) e questo mi pare al momento sia assodato: riguarda in realtà solo un subset degli odimh5, potrebbe essere rimesso in discussione ad esempio da eventuale introduzione dei netcdf e questo ci porta a...
- Documentare la cosa. Sul dove però ho qualche dubbietto.
from arkimet.
ValueBag
supporta solo valori interi e stringhe, quindi il troncamento c'è sempre stato. L'idea è, in fase di scan, scalare i valori; per esempio le latitudini non sono restituite in gradi ma in milionesimi di grado. Per esempio, in scan-grib2/01-common.lua
:
area.latfirst = grib.latitudeOfFirstGridPointInDegrees * 1000000
area.lonfirst = grib.longitudeOfFirstGridPointInDegrees * 1000000
from arkimet.
Forse mi sono spiegato male: sono cosciente del fatto che il troncamento c'è sempre stato e che ValueBag gestisce solo stringhe e interi (ho scritto anche alcune parti in Lua dello scanner odim), il mio dubbio riguardava il passaggio e la gestione (documentata) di un valore non intero al ValueBag da Lua (troncamento, eccezione, arrotondamento, altro).
from arkimet.
Ah, scusa, avevo interpretato male il bug.
Lua non fa distinzione tra numeri interi e floating point, quindi per lanciare un'eccezione servirebbe un controllo su quanto piccola è la parte frazionaria di un numero, e come approccio non mi piace.
Considerando che chi scrive script di scansione spero guardi i risultati di quello che ha scansionato prima di metterli in produzione, propenderei per troncamento (perché mi aspetto che il codice Lua sia conscio dello star generando valori interi) e documentazione.
C'è documentazione relativa a questo aspetto di arkimet, al momento?
from arkimet.
Benissimo il troncamento. Per la documentazione, ho solo aggiunto una riga alla documentazione di ValueBag::load_lua_table
in c9e282d (il messaggio di commit fa riferimento ad una issue diversa, è un refuso)
from arkimet.
Chiudo, per me come doc è sufficiente.
from arkimet.
Related Issues (20)
- Test errors during build HOT 1
- Curl deprecated functions in Fedora 38 build
- ImportError: cannot import name 'cmdline' HOT 1
- strange warning with arki-check HOT 2
- Remove formatter/annotate from arkimet
- Collect information about product annotations
- Missing python dependencies in debian package HOT 2
- (quasi-)atomic import of data in arkimet HOT 2
- Remove conf/vm2/source.lua from installed files HOT 1
- Build RPM package with Meson
- get db metadata to check for completeness HOT 6
- query fails for permission denied HOT 1
- Failure to import odim file when there is an empty file in dataset
- wish: unique messages
- Wrong grib2 level metadata when two surfaces are present HOT 21
- match-alias.conf documentation HOT 2
- Importing old ODIM files in archived sections
- ERROR formatter failed HOT 7
- build errors only on copr, only on F38 and Rocky9 HOT 1
- aliases not working since v1.48 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arkimet.