These are chat archives for astropy/astropy

26th
Apr 2017
Thomas Spriggs
@tspriggs
Apr 26 2017 14:44
Hi all
matrixbot
@matrixbot
Apr 26 2017 14:45
`Cadair` Hi
Thomas Spriggs
@tspriggs
Apr 26 2017 14:45
I have made a 2D gaussian plot from 100 spectra, I next want to make a 2D plot from the original spectra; for a data vs. model comparison
I was hoping someone here might be able to point me in the right direction? going from a list of 100 max amplitudes from each spectra, to a meshgrid plotting them out in a 10x10 plot
matrixbot
@matrixbot
Apr 26 2017 14:49
`Cadair` I don't quite understand what you mean
Thomas Spriggs
@tspriggs
Apr 26 2017 14:50
apologies, so when you plot a 2D Gaussian via astropy, you need to make a meshgrid of your x and y coordinates to pass to your model in the plotting phase
matrixbot
@matrixbot
Apr 26 2017 14:51
`Cadair` ah ok
`Cadair` you want to plot all the gaussians on the same grid?
Thomas Spriggs
@tspriggs
Apr 26 2017 14:52
not right now, i am trying to plot the raw data that I am modelling from
so getting the max value from each spectra to use instead of the returned Gaussian model value
but I am having trouble plotting out a list of 100 values in a 2D plot
matrixbot
@matrixbot
Apr 26 2017 14:54
`Cadair` how does your 1D list map to the 2D grid?
`Cadair` forst 10 in the first row or something more fancy?
Thomas Spriggs
@tspriggs
Apr 26 2017 14:55
no, you have it; the first 10 values are plotted, then you move one up on the y axis then plot another 10 etc.
matrixbot
@matrixbot
Apr 26 2017 14:55
`Cadair` somehting like this should work:
`Cadair` np.array(1dlist).rehape((10,10))
`Cadair` more over: np.array(1dlist).reshape((10,10))
`Cadair` then imshow that output array
Thomas Spriggs
@tspriggs
Apr 26 2017 14:59
awesome, thanks for that, really helped