Skip to content

Commit

Permalink
phase of first RF
Browse files Browse the repository at this point in the history
  • Loading branch information
aghaeifar committed Feb 17, 2024
1 parent be41168 commit 084e568
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config_default.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RF_FA[1] = 0.0
RF_FA[2] = 0.0
RF_FA[3] = 0.0
RF_FA[4] = 0.0
; RF Phase in degree. The first RF phase is always 0.0, but can be controlled by PHASE_CYCLING in STEADY_STATE
; RF Phase in degree. Note PHASE_CYCLING will be added to the phase of the first RF
RF_PH[0] = 0.0
RF_PH[1] = 0.0
RF_PH[2] = 0.0
Expand Down
4 changes: 2 additions & 2 deletions src/kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ __global__ void cu_sim(const simulation_parameters *param, const float *pFieldMa
gen.discard(param->seed + spin_no); // each spins has its own seed, and param->seed differes for each GPU in HPC with multiple GPUs

//uint16_t n_timepoints_local;
float field = 0., rf_phase = 0., time_elapsed = 0.;
float field = 0., rf_phase = param->RF_PH[0], time_elapsed = 0.;
float m0[3], m1[3];
float xyz[3], xyz_new[3];
for(uint32_t i=0, shift=3*spin_no; i<3; i++)
Expand Down Expand Up @@ -136,7 +136,7 @@ __global__ void cu_sim(const simulation_parameters *param, const float *pFieldMa
relax(exp(-time_elapsed/param->T1), exp(-time_elapsed/param->T2), m1);
// save echo and copy m1 to m0 for the next iteration
for (uint32_t i=0, shift=3*param->n_TE*spin_no + 3*current_te; i<3; i++)
M1[shift + i] = m0[i] = m1[i];
M1[shift + i] = m0[i] = m1[i];
accumulated_phase = 0; // reset phase since we have applied it in the previous step
old_timepoint = current_timepoint;
current_te++;
Expand Down

0 comments on commit 084e568

Please sign in to comment.