diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 669739f..e64ac19 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -40,7 +40,7 @@ jobs: # Download Figures artifact - name: Download Figures artifact - if: ${{ github.event.workflow_run.conclusion == 'success' }} + #if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: actions/download-artifact@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -50,7 +50,7 @@ jobs: # Download Data artifact - name: Download Data artifact - if: ${{ github.event.workflow_run.conclusion == 'success' }} + #if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: actions/download-artifact@v4 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/utilities/data_simulation/GenerateData.py b/utilities/data_simulation/GenerateData.py index 7459cc0..1010a48 100644 --- a/utilities/data_simulation/GenerateData.py +++ b/utilities/data_simulation/GenerateData.py @@ -185,21 +185,20 @@ def simulate_training_data(self, bvalues, SNR = (5,100), n = 1000000, Drange = ( - Noise is applied after generating noise-free IVIM signals, using either Gaussian or Rician noise. - Simulated signals are normalized by the mean S0 (b = 0) signal. """ - test = self._rng.uniform(0, 1, (n, 3)) + test = self._rng.uniform(0, 1, (n, 4)) D = Drange[0] + test[:, [0]] * (Drange[1] - Drange[0]) f = frange[0] + test[:, [1]] * (frange[1] - frange[0]) Dp = Dprange[0] + test[:, [2]] * (Dprange[1] - Dprange[0]) #data_sim = np.zeros([len(D), len(bvalues)]) bvalues = np.array(bvalues) if type(SNR) == tuple: - test = self._rng.uniform(0, 1, (n, 1)) - SNR = np.exp(np.log(SNR[1]) + (test * (np.log(SNR[0]) - np.log(SNR[1])))) + noise_std = 1/SNR[1] + test[:,4] * (1/SNR[0] - 1/SNR[1]) addnoise = True elif SNR == 0: addnoise = False - SNR = np.ones((n, 1)) + noise_std = np.ones((n, 1)) else: - SNR = np.full((n, 1), SNR) + noise_std = np.full((n, 1), 1/SNR) addnoise = True # loop over array to fill with simulated IVIM data bvalues = np.array(bvalues).reshape(1, -1) @@ -207,7 +206,6 @@ def simulate_training_data(self, bvalues, SNR = (5,100), n = 1000000, Drange = ( # if SNR is set to zero, don't add noise if addnoise: - noise_std = 1 / SNR # shape (n, 1) noise_real = self._rng.normal(0, noise_std, data_sim.shape) noise_imag = self._rng.normal(0, noise_std, data_sim.shape)