Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RF_Ident_fn_v7 #8

Open
marvinseifert opened this issue Jan 14, 2021 · 0 comments
Open

RF_Ident_fn_v7 #8

marvinseifert opened this issue Jan 14, 2021 · 0 comments

Comments

@marvinseifert
Copy link
Collaborator

marvinseifert commented Jan 14, 2021

Should RF_Ident.STASD_Box_FullRF_Num_pixels be empty of zero if no significant pixel was found? In line 699 it is defined that this variable should be 0 if no significan pixel was found.

                if Sig_Pix_Indicator_STASD == 0
            
                if p.RF_Type(1) == 1 % Box
                    RF_Ident.STASD_Box_FullRF_Num_pixels = 0;
                end
                if p.RF_Type(2) == 1 % All Significant Pixels
                    RF_Ident.STASD_ASP_FullRF_Num_pixels = 0;
                end
                if p.RF_Type(3) == 1 % Gaussian
                    RF_Ident.STASD_Gaus_FullRF_Num_pixels = 0;
                end 

But than in line 1549 it is checked if the variable is empty
if ~isempty(RF_Ident.STASD_Box_FullRF_Num_pixels)...

Since RF_Ident.STASD_Box_FullRF_Num_pixels is 0 at this point it will pass the test in the if statement will run. However, in line 1563 the code tries to index into variables that are empty
RF_Ident.STASD_Box_FullRF_STA_time{i} = squeeze(STA(RF_Ident.STASD_Box_RF_coords_centre{maxSTASD_Box_index}(1),RF_Ident.STASD_Box_RF_coords_centre{maxSTASD_Box_index}(2),:,i));

I suggest either setting the variable to empty or testing against if the variable is 0 in the if statement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant