Re: [Numpy-discussion] numpy histogram data

2021-06-08 Thread Keith Sloan
There really is not a lot of other code. RedEllipticalMasses is an Astropy Table read in from a fits file from astropy.table import Table, join import numpy as np RedEllipticalMasses = Table.read('../../GAMA_Data/REMassEClassEmeasure.fits') RedEllipticalMasses['Z_1'] is a single column name 'Z_1'

Re: [Numpy-discussion] numpy histogram data

2021-06-08 Thread Doug Davis
Keith Sloan writes: > Thanks > > Okay trying to understand the data being returned. > I have > > counts, bins = np.histogram(RedEllipticalMasses['Z_1'],bins=80) > > If I print lengths I get > RedEllipticalMasses is 2514 > bins = 81 > and counts is 5 > ( It is 5 Arrays each of length 80) > > Okay

Re: [Numpy-discussion] numpy histogram data

2021-06-07 Thread Keith Sloan
Thanks Okay trying to understand the data being returned. I have counts, bins = np.histogram(RedEllipticalMasses['Z_1'],bins=80) If I print lengths I get RedEllipticalMasses is 2514 bins = 81 and counts is 5 ( It is 5 Arrays each of length 80) Okay I can get centers with centers = 0.5 * (bins[

Re: [Numpy-discussion] numpy histogram data

2021-06-07 Thread Doug Davis
Keith Sloan writes: > Thanks > > Not sure where I get centers & edges from Every time you call np.histogram the second return will be an array of edges; so you define centers anywhere after your first np.histogram call, e.g. with your bins1 variable. (I can't tell if this is exactly the case, bu

Re: [Numpy-discussion] numpy histogram data

2021-06-07 Thread Keith Sloan
Thanks Not sure where I get centers & edges from # Plot of Histogram of Stacked Counts of Red elliptical Galaxies versus Red Shift REMrange1 = RedEllipticalMasses[RedEllipticalMasses[RedEllipticalMasses['uminusr']>1.8]['uminusr'] <2.0] print(len(REMrange1)) counts1, bins1 = np.histogram(REMra

Re: [Numpy-discussion] numpy histogram data

2021-06-06 Thread Doug Davis
Resending after subscribing to the list since original reply was rejected, that's what I get for reading the mailing list from gmane instead of actually subscribing :) Keith Sloan writes: > Okay I have some data which I have created a scatter plot >

[Numpy-discussion] numpy histogram data

2021-06-06 Thread Keith Sloan
Okay I have some data which I have created a scatter plot I have also created a histogram of red Galaxy counts for redshift with RedEllipticalMasses.keep_columns(['uminusr','Z_1']) RedEllipticalMa