Example #1
0
    def test_wavelet_adapter(self, tmpdir, session, operation_factory):
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        wavelet_adapter = ContinuousWaveletTransformAdapter()
        wavelet_adapter.storage_path = storage_folder
        wavelet_adapter.configure(ts_index)

        disk = wavelet_adapter.get_required_disk_size()
        mem = wavelet_adapter.get_required_memory_size()

        wavelet_idx = wavelet_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, WaveletCoefficientsH5, wavelet_idx.gid)
        assert os.path.exists(result_h5)
Example #2
0
    def test_ica_adapter(self, tmpdir, session, operation_factory):
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        ica_adapter = ICAAdapter()
        ica_adapter.storage_path = storage_folder
        ica_adapter.configure(ts_index)

        disk = ica_adapter.get_required_disk_size(ts_index)
        mem = ica_adapter.get_required_memory_size(ts_index)

        ica_idx = ica_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, IndependentComponentsH5, ica_idx.gid)
        assert os.path.exists(result_h5)
Example #3
0
    def test_cross_correlation_adapter(self, tmpdir, session, operation_factory):
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        cross_correlation_adapter = CrossCorrelateAdapter()
        cross_correlation_adapter.storage_path = storage_folder
        cross_correlation_adapter.configure(ts_index)

        disk = cross_correlation_adapter.get_required_disk_size()
        mem = cross_correlation_adapter.get_required_memory_size()

        cross_correlation_idx = cross_correlation_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, CrossCorrelationH5, cross_correlation_idx.gid)
        assert os.path.exists(result_h5)
Example #4
0
    def test_node_covariance_adapter(self, tmpdir, session, operation_factory):
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        node_covariance_adapter = NodeCovarianceAdapter()
        node_covariance_adapter.storage_path = storage_folder
        node_covariance_adapter.configure(ts_index)

        disk = node_covariance_adapter.get_required_disk_size()
        mem = node_covariance_adapter.get_required_memory_size()

        covariance_idx = node_covariance_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, CovarianceH5, covariance_idx.gid)
        assert os.path.exists(result_h5)
Example #5
0
    def test_metrics_adapter_launch(self, tmpdir, session, operation_factory):
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        metrics_adapter = TimeseriesMetricsAdapter()
        metrics_adapter.storage_path = storage_folder
        metrics_adapter.configure(ts_index)

        disk = metrics_adapter.get_required_disk_size()
        mem = metrics_adapter.get_required_memory_size()

        datatype_measure_index = metrics_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, DatatypeMeasureH5, datatype_measure_index.gid)
        assert os.path.exists(result_h5)
Example #6
0
    def test_fmri_balloon_adapter(self, tmpdir, session, operation_factory):
        # To be fixed once we have the migrated importers
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        fmri_balloon_adapter = BalloonModelAdapter()
        fmri_balloon_adapter.storage_path = storage_folder
        fmri_balloon_adapter.configure(ts_index)

        disk = fmri_balloon_adapter.get_required_disk_size()
        mem = fmri_balloon_adapter.get_required_memory_size()

        ts_index = fmri_balloon_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, TimeSeriesRegionH5, ts_index.gid)
        assert os.path.exists(result_h5)
Example #7
0
    def test_node_coherence_adapter(self, tmpdir, session, operation_factory):
        # algorithm returns complex values instead of float
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)

        node_coherence_adapter = NodeCoherenceAdapter()
        node_coherence_adapter.storage_path = storage_folder
        node_coherence_adapter.configure(ts_index)

        disk = node_coherence_adapter.get_required_disk_size()
        mem = node_coherence_adapter.get_required_memory_size()

        coherence_spectrum_idx = node_coherence_adapter.launch(ts_index)

        result_h5 = h5.path_for(storage_folder, CoherenceSpectrumH5, coherence_spectrum_idx.gid)
        assert os.path.exists(result_h5)
Example #8
0
    def test_fcd_adapter(self, tmpdir, session, operation_factory):
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)
        sw = 0.5
        sp = 0.2

        fcd_adapter = FunctionalConnectivityDynamicsAdapter()
        fcd_adapter.storage_path = storage_folder
        fcd_adapter.configure(ts_index, sw, sp)

        disk = fcd_adapter.get_required_disk_size()
        mem = fcd_adapter.get_required_memory_size()

        fcd_idx = fcd_adapter.launch(ts_index, sw, sp)

        result_h5 = h5.path_for(storage_folder, FcdH5, fcd_idx.gid)
        assert os.path.exists(result_h5)
Example #9
0
    def test_pearson_correlation_coefficient_adapter(self, tmpdir, session, operation_factory):
        # To be fixed once we have the migrated importers
        storage_folder = str(tmpdir)
        ts_index = make_ts_from_op(session, operation_factory)
        t_start = 0.9765625
        t_end = 1000.0

        pearson_correlation_coefficient_adapter = PearsonCorrelationCoefficientAdapter()
        pearson_correlation_coefficient_adapter.storage_path = storage_folder
        pearson_correlation_coefficient_adapter.configure(ts_index, t_start, t_end)

        disk = pearson_correlation_coefficient_adapter.get_required_disk_size()
        mem = pearson_correlation_coefficient_adapter.get_required_memory_size()

        correlation_coefficients_idx = pearson_correlation_coefficient_adapter.launch(ts_index, t_start, t_end)

        result_h5 = h5.path_for(storage_folder, CorrelationCoefficientsH5, correlation_coefficients_idx.gid)
        assert os.path.exists(result_h5)