Issue332chartscomparingsystems

Merged
#39 · Created  · Last updated

Merged pull request

Merged in issue332chartsComparingSystems (pull request #39)

2fd39f7·Author: ·Closed by: ·2016-02-19

Description

OK. This is now working as I would like. The djp demo site is up-to-date with this code and seems to all work fine. This branch also includes my issue #351 changes that have simplified the chart JavaScript code.

  • Altered some of the CT plot data to produce data split by system as well as requested procedure name. Unfinished, but a start. References issue #332.

  • Updated a bit more of the CT request plot code. References issue #332

  • Median DLP for requested procedures now split by scanner. References issue #332

  • Plot now shows the data as a series per scanner, but I think there is some issue with the data order. References issue #332

  • Added legend and tried to fix order of data. References issue #332

  • Order of data sorted out (no pun intended). At the moment the plot only works if all scanners have some data for every requested procedure type being displayed. Drilldown and sorting do not work at the moment. References issue #332

  • Drilldown now works in the chart. Labelling of chart series and titles needs to be sorted out. References issue #332

  • Drilldown labelling now works properly in the chart. References issue #332

  • For each requested procedure, forced all scanners to use the same histogram bins: enables histograms to be plotted together for comparison. References issue #332

  • Ensured that there is an entry for every requested procedure for each scanner, even if some scanners have zero requests for some procedures. References issue #332

  • There was a problem with the drilldown which was preventing all the histograms from being displayed. Fixed this now. I think that the fix may help increase the speed of other charts. References issue #332

  • Tidying up of chart code. References issue #332

  • Put back line to force categories to be correctly shown on drilldown chart. References issue #332

  • The histograms were in a different order to the median values, so there was a mis-match between the main series and the drilldown. It turns out that this is because the python sorting routines sort in a different way to that of the Django database queries. I've fixed it by ordering the requestSummary data to match the database-provided list of names. References issue #332

  • Removed itemgetter that is not required. References issue #332

  • Plot of DLP per CT request type now working for mean, median and both. Need to fix the sorting routines. References issue #332

  • Fixed plot of CT request type frequency so that it works with the new data. References issue #332

  • Fixed error when padding data with missing request types. References issue #332

  • Fixed the sorting routines. References issue #332

  • Changed colours for series - hopefully results in less offensive colours when there are a few series plotted. References issue #332

  • Added new library to help create attractive colour ranges. See http://vis4.net/blog/posts/mastering-multi-hued-color-scales/#more-4101 and https://github.com/gka/chroma.js and https://vis4.net/blog/posts/avoid-equidistant-hsv-colors/. References issue 332

  • Relaced my home-made colour generator with chroma.js for all the CT plots. References issue #332.

  • Included display name on tooltip for request plot. Useful now the plot has a series per system. References issue #332

  • Added user option to plot a series per system, or to group all systems into one series. Also fixed an error in the colour calculations that was causing a divide by zero when there was only one series. References issue #332 and issue #342.

  • Added request filter on radiographic page; added display of request name on radiographic page. References issue #332.

  • Preparing for new radiographic plots. Added database fields to user profile and added skeleton code. References issue #332.

  • Added study and request events for radiographic data. References issue #332.

  • Added code to views.py to calculate data for the new radiographic plots. References issue #332

  • Added radiographic pie chart of requested procedure name frequency. References issue #332

  • Radiographic plots of DAP per requested procedure name added. References issue #332.

  • Radiographic plots of DAP per study description added. References issue #332.

  • Added code to CT request charts to ensure that links from individual system histogram points take the user to only that system data. References issue #332

  • Fixed typo that was preventing charts from resizing. References issue #332

  • Added border around each datapoint. Helps to see series that are plotted with a light colour. References issue #342

  • Updated radiographic charts to use new colour scheme. Also fixed a couple of errors: put back in some code that should not have been removed. References issue #332 and issue #342

  • Radiographic chart of DAP per requested procedure name now has a series per x-ray system. References issue #332

  • Simplified request name variable - was using two. References issue #332

  • Simplified call to radiographic data calculation. Fixed problem with over-time colours. References issue #332 and issue #342

  • Fixed another problem with over-time colours. References issue #342

  • Simplified call to CT data calculation. References issue #332

  • Modified logic for mean and median data calculation for requested radiographic data. Should help to speed things up when plotting per system. Need to implement this for the CT requests too. Investigate whether simplifying the field used for num_req or num_acq or num_stu speeds things up too. References issue #332

  • Improved chart calculation code to avoid unnecessary blocks that won't be needed. Also simplified the field that is used to count how many requests, acquisition, studies have been carried out. References issue #332

  • Fixed a couple of errors I introduced yesterday that were preventing a couple of radiographic plots from working. References issue #332

  • Added a further couple of optimisations to the chart data calculations. References issue #332

  • Changed the code so that the user is now redirected back to the filtered view after deleting a study. References issue #70.

  • Updated the buttons to reflect the style used elsewhere on the site. References issue #70.

  • Added user profile field to hold number of histogram bins. This enables the user to change the number of bins that are used. The range is restricted to be between 2 and 100. The range is enforced on the chart options form: the system won't allow the user to submit a value that is too high or low. References issue #343 (and probably fixes it).

  • Updated all radiographic charts to use the new anySeriesSort sorting routine. References issue #332.

  • Optimised imports in views.py to remove unused imports. References issue #332.

  • Added the ability to normalise the histogram data. This makes it easier to compare dose distributions from different systems when the number of entries varies greatly between them. References issue #332

  • Updated JavaScript histogram normalisation code so that the histogram plots are updated live, rather than the user having to return to the main series and then drilldown again. Much, much better now. References issue #332

  • Normalise histograms button now only visible when viewing histograms. References issue #332

  • Accidentally broke some of the plots. Fixing them with this commit. References issue #332

  • Ensuring that charts make full use of the extremes of the colour scale. References issue #332

  • nabled radiographic plot of DAP per study description to be displayed with a series per x-ray system. Just the mean plot so far. References issue #332

  • nabled radiographic plot of DAP per study description for median and combined plot of mean and median to be displayed with a series per x-ray system. References issue #332

  • Fixed typo so that radiographic study DAP works. References issue #332

  • Added histogram normalisation button to study plot. References issue #332

  • Enabled CT plot of DLP per study description to be displayed with a series per scanner. References issue #332

  • Tidying up; also removed a nested for-loop in the workload calculations that was not required. References issue #332

  • Updated ctfiltered.html so that it uses the new sorting routines for the study description DLP chart. References issue #332

  • Corrected mis-indentation that was preventing radiographic study frequency pie chart from working. References issue #332

  • Ensured that CTDI and DLP histograms only calculated if required. Moved returnStructure element assigment out of a for loop in two places. References issue #332

  • Exporting charts as an image when offline is now possible. Fixes issue #346

  • Made calculation of DLP and CTDI histogram data more efficient if they are both required. Also fixed error when assigning median CTDI data to the chart. References issue #332

  • Swapped JavaScript loading order to ensure that export to csv and xls are still present on charts. References issue #346

  • Forcing charts to use local production of chart image export. References issue #346

  • Updated changes files.

  • Corrected field so that total DAP is displayed. References issue #348

  • Added condition so that CR modality studies work. Also corrected typos in if statements in the template. References issue #348

  • Updated changes files.

  • Reduced max number of histogram bins to 40. Reduces the chance of the server running out of memory. References and fixes issue #343

  • Updating changes files

  • Further optimisation of radiographic chart data calculations. References issue #217

  • Enabled radiographic plots of DAP per acquisition protocol to be displayed with a series per x-ray system. References issue #332

  • Fixed a typo: changed Mean to Median. References issue #332

  • Enbled radiographic plot of kVp per acquisition protocol to be carried out with series per x-ray system. References issue #332

  • Updated a variable name to fix a bug with the over-time plots. References issue #332

  • Updated a variable name to fix a bug with the over-time plots. References issue #332

  • Enabled radiographic chart of mAs to be plotted with a series per x-ray system. References issue #332

  • Reformatting of some code; replaced multiple items within if statements with a single item outside the statements. References issue #332

  • CTDI and DLP per acquisition can now be plotted with a series per CT scanner. Removed the plots that showed DLP and CTDI on the same plot. Also simplified some template code. References issue #332

  • Fixed CT acquisition pie chart (I think). References issue #332

  • Fixing issues with some pie charts. References issue #332

  • Fixing issues with some charts of dose over time. References issue #332

  • REmoved duplicate variables in dx chart calculations in views.py. Also changed variable names to use lower-case. References issue #332

  • Removed duplicate variables in ct chart calculations in views.py. Corrected error in CTDI units displayed on the charts. Changed variables to use lower-case. References issue #332

  • Fixing the series colours to ensure the full range is used in all circumstances. References issue #332

  • Removed filtering in dx_summary_chart_data as it was not needed. Code now mirrors the ct routine. Sort of references issue #332.

  • Simplified chart data processing by moving most work to functions. These functions are used by both CT and DX charts. References issue #351 and issue #332.

  • Corrected typo that was preventing a CT chart from working. References issue #351

  • Corrected an error in the if logic that was preventing CT charts from working when both DLP and CTDI per acquisition protocol are selected. References issue #332

  • Reduced the indentation for some CT chart calculations as it was not required. References issue #332.

  • Updated series labels of average plots so that (mean) or (median) is added to the series labels when plotting both mean and median values. It's so good to be able to update the code in one place and know that all the charts of this type will be up-to-date with the change (thanks, issue #351). References issue #332 and issue #351.

0 attachments

0 comments

Loading commits...