{ "cells": [ { "cell_type": "markdown", "id": "armed-language", "metadata": {}, "source": [ "# Version history\n", "This page shows major changes in recent releases with an emphasis on what the user should be aware of." ] }, { "cell_type": "markdown", "id": "automatic-charleston", "metadata": {}, "source": [ "## 0.0.58 - 25th of April 2023\n", "- Support for new McStas features\n", " - DEPENDENCY: instrument.set_dependency [info here](../user_guide/instrument_object.ipynb)\n", " - SEARCH: instrument.add_search / component.add_search [instrument info here](../user_guide/instrument_object.ipynb) [component info here](../user_guide/component_object.ipynb)\n", " - NeXus: settings(NeXus=True), still can't read data so backengine will fail after writing data\n", " - openacc: settings(openacc=True), for compiling to GPU\n", "- Infers parameter, variable and component names\n", " - Each time anything is added to an instrument, one gives it a name and python variable name, now the McStas name can be inferred from the python name so the following statements are equivalent:\n", " - wavelength = instrument.add_parameter(\"wavelength\", value=5.0)\n", " - wavelength = instrument.add_parameter(value=5.0)\n", " - And likewise\n", " - my_arm = instrument.add_component(\"my_arm\", \"Arm\")\n", " - my_arm = instrument.add_component(\"Arm)\n", "- Examples are being updated to run McStas 3.X, not all documentation updated yet\n", "- Fixed issue where astrox components where loaded in McXtrace\n", "\n", "## 0.0.52 - 17th of November 2022\n", "- New features for diagnostics of instruments, [tutorial here](../tutorial/McStasScript_tutorial_6_Diagnostics.ipynb)\n", " - Diagrams can now plot intensity and ncount along instrument\n", " - Diagrams can now plot any variable along the instrument\n", " - Diagnostics object can show beam at a specified number of points in the instrument\n", "- McStasEventData can now generate binned data, described in [data](../user_guide/data.ipynb)\n", "- All datasets now have attributes total I / E / N in metadata, shown in [data](../user_guide/data.ipynb)\n", "- McStasScript can now read 0D monitors\n", "- Improvements to reader, better handling of using COPY for component names\n", "- Instrument objects now have a mccode_version attribute that keeps major version as integer\n", "\n", "## 0.0.51 - 17th of October 2022\n", "- New feature for segmenting the instrument using MCPL input/output [tutorial here](../tutorial/McStasScript_tutorial_5_MCPL_bridges.ipynb)\n", "- Printed components now conform to McStas syntax (contribution from Peter Willendrup and Erik Knudsen)\n", "\n", "## 0.0.50 - 20th of June 2022\n", "- Support for McStas 3.X\n", " - USERVARS can now be used with *add_user_var* [parameters_and_variables](../user_guide/parameters_and_variables.ipynb)\n", " - instrument_reader can read McStas 3.X files with simple USERVARS\n", "- Improvements to instrument diagrams\n", "- Introduced checks for using same name for parameters, declare variables and user variables\n", "- Now possible to easily show instrument file for debugging with *show_instrument_file*\n", "\n", "## 0.0.48 - 10th of June 2022\n", "- Improvements to instrument diagram\n", " - Colors component depending on category\n", " - EXTEND and WHEN shown with decorating component box\n", " - Hovering mouse over left side of box shows component info\n", " - All Union connections included\n", " - Improved line arrows to turn in a few segments, greatly clarifying reading busy diagrams\n", " - Included in all documentation\n", "- Bug fix in simulator widget that avoids a crash when value in text field could not be converted to float\n", "- Included documentation on widgets in [widget_user_guide](../user_guide/widgets.ipynb)\n", "- Now allows for spaces in McStas path, working on how this could work for data path\n", "\n", "## 0.0.47 - 31th of May 2022\n", "Introducing instrument diagrams, they are really useful for getting a quick overview of an instrument\n", "- Instrument diagrams now available, use the instrument method *show_diagram*\n", "- Instrument output_path now reports to libpyvinyl calculator path system (Thanks Shervin)\n", "- Update of the documentation to include *show_diagram* in [instrument user guide](../user_guide/instrument_object.ipynb), [JUMP tutorial](../tutorial/McStasScript_tutorial_4_JUMP.ipynb)\n", "\n", "\n", "## 0.0.44 - 16th of May 2022\n", "This version is a cleanup of the syntax and streamlining of the package. It improves the consistency of the language use, removes unused methods and is better at recognizing when wrong input is made.\n", "\n", "- Renaming of methods to make the \"show\" verb in method names more consistent.\n", " - show_components did show all available McStas components, now shows components in current instrument\n", " - print_components still shows all components in current instrument, but also a warning pointing to show_instrument as best practice\n", " - available_components now shows all available McStas components for help purposes\n", "- Moved away from allowing arbitrary keyword arguments in some places, so it is now an error to misspell keyword arguments.\n", " - Instrument initialization\n", " - Instrument.settings method\n", " - Instrument.show_components (and print_components) methods\n", " - Component initialization\n", "- Removed instrument methods for manipulating components like set_component_AT() as they provided an additional way of doing the same thing, but more error prone than working with the component objects directly.\n", "- Moved widgets out of base import of package to speed up import\n", "- Widgets for Jupyter notebooks now loaded with: \n", " - *import mcstasscript.jb_interface as ms_widget*\n", " - ms_widget.show(instrument) / ms_widget.show(data) shows widget interface for instrument / data\n", " - ms_widget.SimInterface(instrument) needed if one wants to retrieve data made in an interface\n", "- Added instrument methods for moving and removing components (both explained in [instrument object page](../user_guide/instrument_object.ipynb))\n", " - instrument.move_component\n", " - instrument.remove_comopnent\n", "- Introduced error checking before writing / running McStas file, can be disabled with settings(checks=False)\n", " - Checks all Component AT / ROTATED RELATIVE statements have valid targets\n", " - Checks that variables used as component parameters have been declared\n", "- When using show_instrument in a notebook, a new tab was opened and it was shown in the notebook, changed it so no new tab is made when running in a notebook. If a new tab is desired use the keyword argument *new_tab* and set it to True." ] }, { "cell_type": "code", "execution_count": null, "id": "synthetic-multiple", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" } }, "nbformat": 4, "nbformat_minor": 5 }