You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that choosing positivity constraint for a complex object forces the object to have positive real and imaginary parts. Is that how it is supposed to be?
We were assuming that positivity constraint only means that the real part is forced to be positive.
We were thinking about implementing a more general way of constraining the phase shift of the object. Filipe, what do you think?
Hi Filipe,
I found that choosing positivity constraint for a complex object forces the object to have positive real and imaginary parts. Is that how it is supposed to be?
We were assuming that positivity constraint only means that the real part is forced to be positive.
We were thinking about implementing a more general way of constraining the phase shift of the object. Filipe, what do you think?
I refer to the following two parts in the code:
phasing.c: phaser_apply_constraints(...)
}else if(constraints & SpPositiveComplexObject){
if(sp_real(new_model->image->data[i]) < 0){
if(constraints & SpPositivityFlipping){
sp_real(new_model->image->data[i]) = fabs(sp_real(new_model->image->data[i]));
}else{
sp_real(new_model->image->data[i]) = 0;
}
}
if(sp_imag(new_model->image->data[i]) < 0){
if(constraints & SpPositivityFlipping){
sp_imag(new_model->image->data[i]) = fabs(sp_imag(new_model->image->data[i]));
}else{
sp_imag(new_model->image->data[i]) = 0;
}
}
}else if(constraints & SpPositiveComplexObject){
if(g[i].x < 0){
if(constraints & SpPositivityFlipping){
g[i].x = fabs(g[i].x);
}else{
g[i].x = 0;
}
}
if(g[i].y < 0){
if(constraints & SpPositivityFlipping){
g[i].y = fabs(g[i].y);
}else{
g[i].y = 0;
}
}
}
The text was updated successfully, but these errors were encountered: