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

Error at Intensity Feature extraction #10

Open
Yuqia opened this issue Dec 3, 2024 · 0 comments
Open

Error at Intensity Feature extraction #10

Yuqia opened this issue Dec 3, 2024 · 0 comments

Comments

@Yuqia
Copy link

Yuqia commented Dec 3, 2024

Hello,

Thank you very much for this very nice NMCO pipeline.

When I ran your notebook Nuclear_Feature.ipynb, at the step of extracting Intensity features, I got the following error. Could you please check it and provide a fix for it?

Many thanks!


IndexError Traceback (most recent call last)
in <cell line: 2>()
1 # Below are the features computed for 4 nuclei.
----> 2 Int_feat= pd.concat([IDF.measure_intensity_features(props[nuc_of_interest[0]].image,props[nuc_of_interest[0]].intensity_image),
3 IDF.measure_intensity_features(props[nuc_of_interest[1]].image,props[nuc_of_interest[1]].intensity_image),
4 IDF.measure_intensity_features(props[nuc_of_interest[2]].image,props[nuc_of_interest[2]].intensity_image),
5 IDF.measure_intensity_features(props[nuc_of_interest[3]].image,props[nuc_of_interest[3]].intensity_image)])

1 frames
/usr/local/lib/python3.10/dist-packages/nmco/nuclear_features/int_dist_features.py in intensity_histogram_measures(regionmask, intensity)
63 "int_max": np.percentile(intensity[regionmask], 100),
64 "int_mean": np.mean(intensity[regionmask]),
---> 65 "int_mode": stats.mode(intensity[regionmask], axis=None)[0][0],
66 "int_sd": np.std(intensity[regionmask]),
67 "kurtosis": float(kurtosis(intensity[regionmask].ravel())),

IndexError: invalid index to scalar variable.

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