I have a tentative version that combines astropy's Cutout2D and a fitted ellipse, but the ellipse is only used to constrain the dimensions of the rectangle that Cutout2D creates. (Following around a week of trying, I could not determine how to extract values from pixels encompassed by an ellipse. If we (or I) manage to identify how to do so, it would be helpful to compare the rectangle's Gini output to that of the ellipse.)
I have a tentative version that combines astropy's Cutout2D and a fitted ellipse, but the ellipse is only used to constrain the dimensions of the rectangle that Cutout2D creates. (Following around a week of trying, I could not determine how to extract values from pixels encompassed by an ellipse. If we (or I) manage to identify how to do so, it would be helpful to compare the rectangle's Gini output to that of the ellipse.)
I will be trying the mask approach tomorrow.