mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-21 20:39:08 -06:00
Do not process x,y,z variables in DataProcessorText
This commit is contained in:
@@ -6,7 +6,8 @@ function preInitialization()
|
||||
critical objects.
|
||||
]]--
|
||||
|
||||
openspace.time.setTime(openspace.time.currentWallTime())
|
||||
--openspace.time.setTime(openspace.time.currentWallTime())
|
||||
openspace.time.setTime('2015-03-15T11:00:00.00')
|
||||
dofile(openspace.absPath('${SCRIPTS}/bind_keys.lua'))
|
||||
end
|
||||
|
||||
@@ -28,7 +29,10 @@ function postInitialization()
|
||||
|
||||
openspace.printInfo("Done setting default values")
|
||||
|
||||
openspace.setPerformanceMeasurement(true)
|
||||
|
||||
if openspace.modules.isLoaded("ISWA") then
|
||||
|
||||
openspace.iswa.addCdfFiles("${OPENSPACE_DATA}/cdflist.json");
|
||||
|
||||
--openspace.iswa.addCygnet(7);
|
||||
|
||||
@@ -145,12 +145,6 @@ std::vector<float*> DataProcessorText::processData(std::string data, properties:
|
||||
dataOptions[option] = new float[dimensions.x*dimensions.y]{0.0f};
|
||||
}
|
||||
|
||||
// FOR TESTING
|
||||
// ===========
|
||||
// std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||
// start = std::chrono::system_clock::now();
|
||||
// ===========
|
||||
|
||||
int numValues = 0;
|
||||
while(getline(memorystream, line)){
|
||||
if(line.find("#") == 0) continue;
|
||||
@@ -166,12 +160,14 @@ std::vector<float*> DataProcessorText::processData(std::string data, properties:
|
||||
|
||||
first = line.find_first_not_of(" \t", last);
|
||||
last = line.find_first_of(" \t", first);
|
||||
last = (last > 0)? last : lineSize;
|
||||
// boost::spirit::qi::parse(&line[first], &line[last], boost::spirit::qi::double_, value);
|
||||
value = std::stof(line.substr(first, last));
|
||||
if(option >= 0){
|
||||
last = (last > 0)? last : lineSize;
|
||||
// boost::spirit::qi::parse(&line[first], &line[last], boost::spirit::qi::double_, value);
|
||||
value = std::stof(line.substr(first, last));
|
||||
|
||||
if(option >= 0 && std::find(selectedOptions.begin(), selectedOptions.end(), option) != selectedOptions.end())
|
||||
dataOptions[option][numValues] = processDataPoint(value, option);
|
||||
if(std::find(selectedOptions.begin(), selectedOptions.end(), option) != selectedOptions.end())
|
||||
dataOptions[option][numValues] = processDataPoint(value, option);
|
||||
}
|
||||
|
||||
option++;
|
||||
}
|
||||
@@ -181,14 +177,6 @@ std::vector<float*> DataProcessorText::processData(std::string data, properties:
|
||||
|
||||
calculateFilterValues(selectedOptions);
|
||||
|
||||
// FOR TESTING
|
||||
// ===========
|
||||
// end = std::chrono::system_clock::now();
|
||||
// std::chrono::duration<double> elapsed_seconds = end-start;
|
||||
// std::cout << "time: " << elapsed_seconds.count() << "\n";
|
||||
// ===========
|
||||
|
||||
|
||||
return dataOptions;
|
||||
}
|
||||
return std::vector<float*>();
|
||||
|
||||
Reference in New Issue
Block a user