lekernel changed the topic of #m-labs to: Mixxeo, Migen, MiSoC & other M-Labs projects :: fka #milkymist :: Logs http://irclog.whitequark.org/m-labs
sb0 has joined #m-labs
<sb0> what shadow? the background gradient?
<sb0> bah
<zyp> I don't see how it's distracting and unprofessional that it doesn't look like shit
<rjo> like wordart vs a shitty old 16th century font.
<zyp> I don't see how you can compare that to wordart at all
<sb0> rjo, are you OK with the latest screenshot?
<rjo> seriously though. every little bit you add to a graph that goes beyond simple presentation of numbers, needs to be thought through.
<rjo> sb0: yeah. one could discuss the choice of colors but that is a minor thing.
<sb0> I changed it to dark blue
wpwrak has quit [Ping timeout: 255 seconds]
wpwrak has joined #m-labs
<sb0> I can copy the grafana color theme if you prefer that
* rjo 's hobby no 83: bashing people who use rainbow colormaps without thinking about it.
<rjo> imho a bargraph needs just one color. maybe two if there is a risk that the bars and the axes might blend visually.
<rjo> sb0: i don't know where the grafana guys got the color map from maybe it came with flot. but the usual blue, green, red with black axes is not very smart since it already is a problem for ~10% of the typical users.
<rjo> i was mostly ranting about shadows that skew the percieved bar heights, background gradients that among other things guide the eye to one edge of the graph (wrongly) etc.
<sb0> alright, I made the bar blacks...
<rjo> zyp: the thinking behind adding "beautiful" gimmicks to a graph is usually as shortsighted and misguided as the idea of adding beauty to text by using wordart.
<sb0> since we're at it: I guess that for the XY plots, we'll want the original data and the fitted curve on the same graph. are black and red appropriate choices for respectively the original and the fit?
<rjo> zyp: how do a background gradient or 3d effects help the presentation of numbers?
<rjo> sb0: i have not looked at cairoplot. does it have the usual bells and whistles, like errorbars etc?
<sb0> it has error bars, yes
<sb0> also, it's fast (unlike matplotlib) and integrates well with python and gtk
<rjo> sb0: my choice would be glyphs with errorbars for the data and a line for the fit. same color even.
<sb0> where's the errorbar data coming from btw?
<rjo> sb0: if it needs different colors, i think blue and black are pretty good. at least color blind people tend to be able to distinguish them. or black vs the dark green or brown-yellow that grafana has as the first few colors
<rjo> depends. if you have the mean of a histogram, the stdev of that data is a good errorbar.
<sb0> so all errorbars have the same size?
<rjo> no
<rjo> the histograms 0,10,0 and 5,0,5 have the same mean but different stdev.
<sb0> sure
<sb0> my question was: on a given plot, are all errorbars always the same size, or should we keep the possibility to set an errorbar size for each individual data point?
<rjo> what is "errorbar size" for you?
<rjo> the thickness?
<sb0> height
<sb0> the right one has a bigger "size"
<rjo> that vertical extension would be just the standard deviation. the horizontal length of the endcaps has no meaning and is very superfluous IMHO.
<rjo> just a vertical line without endcaps is sufficient imho.
<rjo> and in that graph: why does the ordinate axis not start at 0? why are the points red? why are the errorbars blue? ;)
<sb0> yeah, except that most people use and expect the endcaps afaict
<rjo> sb0: is cairoplot not abandoned?
<sb0> it is
<sb0> but it's the best I found with good python/gtk integration and speed
<sb0> and the code base is pretty small
<sb0> https://github.com/m-labs/cairoplot3 < that's for python3 and direct cairo context drawing
<rjo> ack. smallness gets points.
<rjo> does it do dynamically ipdating plots?
<rjo> updating.
<sb0> no, but it's fast enough that you can just redraw
<rjo> with z-buffering or does it flicker?
<sb0> gtk probably does some buffering. resizing the window (and the plot) here is smooth and doesn't use all the CPU...
<sb0> and by smooth I also mean no flickering
<rjo> ok. and i guess it is more or less drop-in so that we could replace it later if desired.
<rjo> i see. and you would use those classes from experiments like in the bottom code?
<rjo> keep in mind that the data will update at ~10Hz and there might be a couple of plots.
<sb0> no, the experiments won't know anything about gtk
<sb0> they just report results, the GUI subscribes to them and updates the plot
<rjo> how does the gui know what to subscribe to and how to plot it?
<sb0> if it ends up lagging, that can be fixed by waiting for e.g. half a second before redrawing the plot, in case more data comes in
<rjo> nah. not waiting. buffering.
<rjo> this is an excellent book on doing plots: http://www.edwardtufte.com/tufte/books_vdqi
<sb0> I was thinking of storing the plot parameters with each entry in the queue/schedule
<rjo> sb0:
<rjo> nah
<sb0> since I guess you don't want to plot everytime, e.g. for the flopping-F, plotting should be done when checking if it works, but not when it's a calibration
<rjo> "plot parameters" sounds very much data-structure
<sb0> plot parameters = what datasets to plot, how, where to display
<rjo> sb0: in that case i would want the plot but minimize the window.
<rjo> as code or as data?
<sb0> data
<rjo> that won't work.
<rjo> plotting is too flexible to fit into a datastructure.
<rjo> it's not just {"x": "freq", "y": "photon_counts"}
<rjo> afaict the plotting needs to be code (if desired with a useful shim layer between cairoplot/whatever and most commonly used plot functions).
<rjo> there could be errorbars, asymetric errorbars, lines/dots/points/dashes, colors
<sb0> "quick plot is only for making 1 simple XY plot and histograms, make it dead simple"
<rjo> true. but since all other cases are require algorithmic plotting, a special datastructure for the simple plot is unnecessary.
<rjo> s/are//
<sb0> well in that case
<sb0> for the difficult cases, the experiment can define functions that take a cairo context and handle the plotting. those would be extracted by the master and passed on to the GUI, which compiles and executes them
<sb0> and you can do what you want with that context, not only use cairoplot but add arbitrary text or whatever graphical widgets
<rjo> people will want multiple plot windows. isn't a cairo context within a window?
<sb0> no, it's within a widget. and there's no problem having multiple ones
<sb0> the custom plot function will just be called as many times as needed with different contexts, to draw every plotting widget
<rjo> but yes. this is how i would implement it. for the "simple xy plot", that data processing/plotting method can just be inhereted.
<sb0> is there a need to configure the plot from the GUI? like, fit type, plot type, etc.
<sb0> or should all this be moved into the experiment file?
<rjo> sb0: why can't the plot function just do everything? including making plot windows etc?
<sb0> well, one experiment could define multiple plots, of course
<rjo> sb0: yeah. a use case is running the experiment (lets take the flopping) and then playing with the data and the fit (changing/fixing parameters etc) without running it again.
<sb0> why should the experiments touch gtk? for a plot, it's more like drawing on a sheet of paper, no?
<sb0> why not put the fit parameters as regular experiment arguments?
<rjo> they should not need to touch gtk (the ink and the wood). but they need to touch the plotting toolkit (the pencil color).
<sb0> oh, that's cairo stuff
<sb0> and yes that would be accessible
<sb0> the experiments need to run the fit anyway, and sometimes use the result of it to update the parameter database
<rjo> yes. that is how i would do it.
<rjo> but digging out that parameter from the pdb needs to be easy.
<sb0> what I'd do is: def run(fit_options): results = mess_with_hardware(); report(results); fit_params = fit(results, fit_options); report(fit_params); update_paramdb(fit_params["a"]);
<sb0> then the plot would be configured to associate the proper dataset from the results with the fit parameters
<rjo> almost. is the scan loop outside run()?
<sb0> no
<rjo> (i think this should be taken to the list and ting rei and justin should invest some time to think this through)
<sb0> and the scan parameters would be run() arguments of course
<rjo> but you want to report(results) etc on each iteration of the loop.
<sb0> yes
<rjo> and probably s/report/publish/
<sb0> well, report would be broken down into create_dataset (as class attribute, like parameters and devices, so that the list of datasets can be known in advance) and add_to_dataset
<rjo> why a class attribute?
<sb0> rjo, if you want real time updates, you need to RPC them... which will slow down the kernel
<sb0> though, with the 2-CPU system, we can have a write-only rpc_fast syscall that buffers the data and hides the TCP and other latencies
<rjo> realtime updates on the scan loop are needed.
<sb0> just to be consistent with devices/parameters in AutoContext
<rjo> not on the inner for i in range(repetitions) loop
<rjo> no rpc.
<sb0> ah, ok
<rjo> its published from run()
<rjo> it's
<rjo> how do the classattributes work with inheritance?
<sb0> derived classes inherit their value (or reference for mutable types)
<rjo> but then multiple experiments reference the same dataset and plot.
<sb0> oh
<sb0> AutoContext will replace the Dataset() with a new connection to a HDF file for each experiment, or whatever is set up
<rjo> they would need to be explicitly instantiated as classattribs in each experiment. may be fine.
<sb0> you can override class attributes with instance attributes
<sb0> which is what is already done for devices/parameters
<sb0> there would only be a mess if someone mutates the class attributes in a derived class
<sb0> then the attribute would be mutated everywhere as soon as the derived class is imported
<rjo> on __new__? or __init__?
<rjo> (AutoContext replaces)
<sb0> class X(Y): data.attribute = some_other_value
<sb0> AutoContext replaces in __init__
<rjo> i have to think about the lifetime of a class and the instance and the attributes therein...
<rjo> gotta go...
<sb0> simplest is each run creates a new class
<sb0> *instance
<rjo> could we take this to the list or revisit it tomorrow?
<sb0> ok
<rjo> so each run import/reload() or exec?
<sb0> yes
<rjo> yes. needed because of editing.
<sb0> well, import/reload only when the file is modified
<sb0> but create a new instance every time
<rjo> but classes exist after import/reload()/exec until __del__
<rjo> so create classes on import/reload, instance on experiment run?
<sb0> yes
<rjo> when do you destroy an instance?
<rjo> on window close?
<sb0> after run() exits
<rjo> ... or leave it for garbage collection.
<rjo> ah. this is why you want the plots in the classes.
<rjo> how would they survive a changing experiment file where they are class attribs?
<rjo> they would be recreated/cleared on reload()
<sb0> yes
<rjo> hmm.
<rjo> there would be no way to change the data processing/plotting code keeping the same data.
<rjo> but anyway. gotta go.
<sb0> ok, ttyl
<sb0> there would... break it apart from run() into another method
xiangfu has joined #m-labs
xiangfu has quit [Client Quit]
xiangfu has joined #m-labs
mumptai has joined #m-labs
mumptai has quit [Ping timeout: 264 seconds]
sb0 has quit [Quit: Leaving]
sb0 has joined #m-labs
jaeckel has quit [Ping timeout: 244 seconds]
jaeckel has joined #m-labs
xiangfu has quit [Ping timeout: 240 seconds]
_florent_ has joined #m-labs
<larsc> sb0: 720p DVI worked on that video board right?
<sb0> yes
<sb0> why?
<larsc> I need to build a low level DVI/HDMI analyzer
<larsc> for a 720p signal
aeris has quit [Ping timeout: 272 seconds]
aeris has joined #m-labs
aeris has quit [Client Quit]
xiangfu has joined #m-labs
xiangfu has quit [Quit: leaving]
aeris has joined #m-labs
<GitHub168> [artiq] sbourdeauducq pushed 2 new commits to master: http://git.io/t06Qng
<GitHub168> artiq/master d21211a Yann Sionneau: lda: docstring style
<GitHub168> artiq/master 2ad063c Yann Sionneau: Lda: sanity checks on attenuation value...
sb0 has quit [Quit: Leaving]
kilae has joined #m-labs
kilae has quit [Quit: ChatZilla 0.9.91.1 [Firefox 34.0.5/20141126041045]]
mumptai has joined #m-labs
<mumptai> moin
mumptai has quit [Quit: Verlassend]
_florent_ has quit [Read error: Connection reset by peer]
mumptai has joined #m-labs