Issue #1638 Made pypies slab reads work in more than 2-d data. Moved DecisionTree to common.dataquery. Merged changes into CAVEApplication.
Amend: Deleted old DecisionTree Change-Id: Id51a32c42f5485a5261dd73f88f55a6fda3263c8 Former-commit-id:14dba9a749
[formerlyea2501abbb
] [formerly40c76c2c82
[formerly 4f76cfa7102f2b266bc94dbeb4ed6d2e4028c106]] Former-commit-id:40c76c2c82
Former-commit-id:fc27ac4a30
This commit is contained in:
parent
ced7f55d63
commit
48a283f0f2
7 changed files with 46 additions and 12 deletions
|
@ -31,13 +31,13 @@ import org.eclipse.core.runtime.IStatus;
|
|||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
import com.raytheon.uf.common.dataquery.DecisionTree;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.datastructure.DataCubeContainer;
|
||||
import com.raytheon.uf.viz.core.datastructure.DecisionTree;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.URICatalog.IURIRefreshCallback;
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ package com.raytheon.uf.viz.core.rsc.updater;
|
|||
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.dataquery.DecisionTree;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.viz.core.datastructure.DecisionTree;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.IDisposeListener;
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ import com.raytheon.uf.viz.core.RecordFactory;
|
|||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.localization.CAVELocalizationNotificationObserver;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationInitializer;
|
||||
import com.raytheon.uf.viz.core.notification.jobs.NotificationManagerJob;
|
||||
import com.raytheon.uf.viz.personalities.cave.workbench.VizWorkbenchAdvisor;
|
||||
import com.raytheon.viz.alerts.jobs.AutoUpdater;
|
||||
import com.raytheon.viz.alerts.jobs.MenuUpdater;
|
||||
|
@ -129,11 +130,21 @@ public class CAVEApplication implements IStandaloneComponent {
|
|||
// dialog which would break gfeClient-based cron jobs.
|
||||
return IApplication.EXIT_OK;
|
||||
}
|
||||
initializeSerialization();
|
||||
|
||||
Job serializationJob = initializeSerialization();
|
||||
initializeDataStoreFactory();
|
||||
initializeObservers();
|
||||
initializeSimulatedTime();
|
||||
|
||||
// wait for serialization initialization to complete before
|
||||
// opening JMS connection to avoid deadlock in class loaders
|
||||
if (serializationJob != null) {
|
||||
serializationJob.join();
|
||||
}
|
||||
|
||||
// open JMS connection to allow alerts to be received
|
||||
NotificationManagerJob.connect();
|
||||
|
||||
int returnCode = IApplication.EXIT_OK;
|
||||
|
||||
try {
|
||||
|
@ -154,6 +165,14 @@ public class CAVEApplication implements IStandaloneComponent {
|
|||
// catch any exceptions to ensure rest of finally block
|
||||
// executes
|
||||
}
|
||||
|
||||
try {
|
||||
// disconnect from JMS
|
||||
NotificationManagerJob.disconnect();
|
||||
} catch (RuntimeException e) {
|
||||
// catch any exceptions to ensure rest of finally block
|
||||
// executes
|
||||
}
|
||||
}
|
||||
|
||||
if (returnCode == PlatformUI.RETURN_RESTART) {
|
||||
|
@ -176,8 +195,8 @@ public class CAVEApplication implements IStandaloneComponent {
|
|||
new PyPiesDataStoreFactory(pypiesProps));
|
||||
}
|
||||
|
||||
protected void initializeSerialization() {
|
||||
new Job("Loading Serialization") {
|
||||
protected Job initializeSerialization() {
|
||||
Job job = new Job("Loading Serialization") {
|
||||
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
|
@ -190,7 +209,9 @@ public class CAVEApplication implements IStandaloneComponent {
|
|||
return Status.OK_STATUS;
|
||||
}
|
||||
|
||||
}.schedule();
|
||||
};
|
||||
job.schedule();
|
||||
return job;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,13 +27,13 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.grid.GridRecord;
|
||||
import com.raytheon.uf.common.dataquery.DecisionTree;
|
||||
import com.raytheon.uf.common.dataquery.requests.DbQueryRequest;
|
||||
import com.raytheon.uf.common.dataquery.requests.DbQueryRequestSet;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.responses.DbQueryResponse;
|
||||
import com.raytheon.uf.common.dataquery.responses.DbQueryResponseSet;
|
||||
import com.raytheon.uf.viz.core.RecordFactory;
|
||||
import com.raytheon.uf.viz.core.datastructure.DecisionTree;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.uf.viz.derivparam.data.AbstractRequestableData;
|
||||
|
|
|
@ -6,7 +6,8 @@ Bundle-Version: 1.0.0.qualifier
|
|||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization
|
||||
Export-Package: com.raytheon.uf.common.dataquery.db,
|
||||
Export-Package: com.raytheon.uf.common.dataquery,
|
||||
com.raytheon.uf.common.dataquery.db,
|
||||
com.raytheon.uf.common.dataquery.requests,
|
||||
com.raytheon.uf.common.dataquery.responses
|
||||
Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.12.1173",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* further licensing information.
|
||||
**/
|
||||
|
||||
package com.raytheon.uf.viz.core.datastructure;
|
||||
package com.raytheon.uf.common.dataquery;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -95,12 +95,24 @@ def read(ds, request):
|
|||
elif rt == 'SLAB':
|
||||
minIndex = request.getMinIndexForSlab()
|
||||
maxIndex = request.getMaxIndexForSlab()
|
||||
|
||||
# Get all sizes and slices in reverse order
|
||||
slices = []
|
||||
sizes = []
|
||||
numIndices = len(minIndex)
|
||||
# Get all sizes and slices in reverse order
|
||||
for i in reversed(range(numIndices)):
|
||||
slices.append(slice(minIndex[i], maxIndex[i]))
|
||||
sizes.append(maxIndex[i] - minIndex[i])
|
||||
|
||||
sel = h5py.selections.HyperSelection(ds.shape)
|
||||
# mask the request slices
|
||||
sel[()] = False
|
||||
# reverse x and y for hdf5
|
||||
sel[minIndex[1]:maxIndex[1], minIndex[0]:maxIndex[0]] = True
|
||||
sel[tuple(slices)] = True
|
||||
|
||||
# Resize data to desired slab size
|
||||
result = ds[sel]
|
||||
result.resize(maxIndex[1]-minIndex[1], maxIndex[0]-minIndex[0])
|
||||
result.resize(tuple(sizes))
|
||||
else:
|
||||
raise NotImplementedException('Only read requests supported are ' +
|
||||
'ALL, POINT, XLINE, YLINE, and SLAB')
|
||||
|
|
Loading…
Add table
Reference in a new issue