autoplot / cdfj Goto Github PK
View Code? Open in Web Editor NEWPure-Java code for reading NASA/GSFC CDF (Common Data Format) files
Pure-Java code for reading NASA/GSFC CDF (Common Data Format) files
The CDAWeb group has been working to support UTF-8 characters in CDF files. Micheal Liu says that Nand had put in support for this, but we need to make sure this was done completely. Also, there's a group with production CDF files using an old ISO charset that includes European characters, so the intent is that the encoding for the file will be declared and libraries must properly form strings.
calls to
printStackTrace()` and replace with proper logging calls.throws
declarations if method doesn't throw the declared exceptionsThrowable
, Exception
, or RuntimeException
new Throwable
calls will be replaced with the following:
IllegalArgumentException
Thrown when parameters are invalid. Message should contain the invalid parameter and, if possible, a message about valid values. If a non-nullable parameter is null
an NPE may be thrown instead.IllegalStateException
Thrown when a value of an instance field is not valid for successful execution of a method.It would be really nice if I could use this library with empty CDF files created by skeletoncdf. I don't believe it can be used this way.
Clean up javadoc linting issues.
@Overriding
methods will be removed.public
and protected
members will have auto generated Javadoc added.Adding minimal maven support.
NOTE: This is WIP.
I am going to use this issue to catalog and prioritize the potential modifications our analysis of the code reveals.
High Priority
null
outside of the switch body.Currently the code does not adhere to common member declaration order.
This makes debugging, analyzing, and merging code a challenge.
** Possible Order **
All member sections will be ordered by visibility (public
, protected
, package
, private
).
Add a static final Logger to every class that requires logging: static final Logger LOGGER = Logger.getLogger(MyClass.getCanonicalName());
Remove all references to System.out.print*
Add Logging to all catch blocks: LOGGER.log(Level.Error,ex, ()->String.format("My Method failed with these parameters %s, %s",param1.param2))
;
Add basic Junit (Jupiter) testing support.
Adding log4j2 as a test dependency
Will create tests and clean up ADR so it can be used as a template.
The code getCDFVariable(String vtype, int number) uses a lookup table to find the Variable in O(1) time, but this was implemented with just one table for both Z and R variables. I had assumed a file was either all Z variables or all R variables, and this was an incorrect assumption. (R variables are the original CDF variable type and offer no benefit over the newer Z variable type.)
Autoplot contains a copy of this library within its bowels (CDFJavaDataSource), and this was quickly hacked to have two separate tables, one for Z variables and one for R variables, but this change was never migrated back into the library.
The test files found at https://cdaweb.gsfc.nasa.gov/pub/software/cdf/cdf_test_files/ are missing an example of long64 variable. Also
https://cdaweb.gsfc.nasa.gov/pub/software/cdf/cdf_test_files/bigcdf_compressed.cdf
does not seem to be compressed.
Fix calls to deprecated primitive wrapper constructors replace with valueOf
For years we've talked about having a way to describe virtual variable in CDF files. Suppose the function "add10" is called, and this would have metadata describing the function like "ds[i]=ds[i]+10". Presently the CDF virtual variables are all implemented in "readmycdf.pro", and for Autoplot I've had to review this code and translate to Autoplot/QDataSet codes.
Joey, Bobby and I were chatting at AGU about using the embedded language Lua to specify these. Lua has a typical set of operators and syntax controls with loops and conditionals. This might be all that's needed for these descriptions.
Here is a survey of functions which are needed:
Presumably some functions can be described, like fftPower where a spectrogram is made using a sliding a window and doing ffts on each window, and this function would not be required metadata.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.