{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Using conditional component to modify loggers\n", "Even with the results from the loggers, it can still be difficult to explain all the features in the resulting scattering pattern. The conditional components can modify a logger so that it only records events when the final state of the neutron satisfy some condition. The condition could be leaving with a certain energy or in a specified direction. Before demonstrating these conditional components, we will set up an interesting sample and sample environment, including a few loggers and a time of flight 2theta detector." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Set up an example instrument\n", "First an example instrument is made, again with a cryostat but this time with a box shaped single crystal of YBaCuO. Since the *single_crystal_process* have quite a few parameters, we use the *set_parameters* method that allows setting parameters using a dictionary." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import mcstasscript as ms\n", "instrument = ms.McStas_instr(\"python_tutorial\", input_path=\"run_folder\")" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Set up Al material with incoherent and powder\n", "Al_incoherent = instrument.add_component(\"Al_incoherent\", \"Incoherent_process\")\n", "Al_incoherent.sigma = \"4*0.0082\"\n", "Al_incoherent.packing_factor = 1\n", "Al_incoherent.unit_cell_volume = 66.4\n", "\n", "Al_powder = instrument.add_component(\"Al_powder\", \"Powder_process\")\n", "Al_powder.reflections = \"\\\"Al.laz\\\"\"\n", "\n", "Al = instrument.add_component(\"Al\", \"Union_make_material\")\n", "Al.process_string = '\"Al_incoherent,Al_powder\"'\n", "Al.my_absorption = \"100*4*0.231/66.4\"\n", "\n", "# Set up YBaCuO with incoherent and single crystal\n", "YBaCuO_incoherent = instrument.add_component(\"YBaCuO_incoherent\", \"Incoherent_process\")\n", "YBaCuO_incoherent.sigma = 2.105\n", "YBaCuO_incoherent.unit_cell_volume = 173.28\n", "\n", "YBaCuO_crystal = instrument.add_component(\"YBaCuO_crystal\", \"Single_crystal_process\")\n", "YBaCuO_crystal.set_parameters(\n", "{\"ax\" : 3.816, \"ay\" : 0, \"az\" : 0,\n", " \"bx\" : 0, \"by\" : 3.886, \"bz\" : 0,\n", " \"cx\" : 0, \"cy\" : 0, \"cz\" : 11.677,\n", " \"delta_d_d\" : 5E-4, \"mosaic\" : 30, \"barns\" : 1,\n", " \"reflections\" : '\"YBaCuO.lau\"'})\n", "\n", "YBaCuO = instrument.add_component(\"YBaCuO\", \"Union_make_material\")\n", "YBaCuO.process_string = '\"YBaCuO_incoherent,YBaCuO_crystal\"'\n", "YBaCuO.my_absorption = 100*14.82/173.28\n", "\n", "src = instrument.add_component(\"source\", \"Source_div\")\n", "src.xwidth = 0.01\n", "src.yheight = 0.035\n", "src.focus_aw = 0.01\n", "src.focus_ah = 0.01\n", "src.lambda0 = instrument.add_parameter(\"wavelength\", value=5.0,\n", " comment=\"Wavelength in [Ang]\")\n", "src.dlambda = \"0.01*wavelength\"\n", "src.flux = 1E13\n", "\n", "# At a reference point to build the cryostat around\n", "cryostat_center = instrument.add_component(\"cryostat_center\", \"Arm\")\n", "cryostat_center.set_AT([0, 0, 1], RELATIVE=src)\n", "\n", "# Parameter for controlling sample rotation\n", "A3_angle = instrument.add_parameter(\"A3_angle\", value=0)\n", "\n", "sample = instrument.add_component(\"sample\", \"Union_box\")\n", "sample.set_AT([0, 0, 0], RELATIVE=cryostat_center)\n", "sample.set_ROTATED([0, A3_angle, 0], RELATIVE=cryostat_center)\n", "sample.xwidth = 0.015\n", "sample.yheight = 0.032\n", "sample.zdepth = 0.012\n", "sample.material_string = '\"YBaCuO\"'\n", "sample.priority = 200\n", "\n", "# Setting up two layers of cryostat\n", "inner_cryostat_wall = instrument.add_component(\"inner_cryostat_wall\", \"Union_cylinder\")\n", "inner_cryostat_wall.material_string = \"\\\"Al\\\"\"\n", "inner_cryostat_wall.priority = 12\n", "inner_cryostat_wall.radius = 0.0621\n", "inner_cryostat_wall.yheight = 0.16\n", "inner_cryostat_wall.p_interact = 0.20\n", "inner_cryostat_wall.set_AT([0, 0.01, 0], RELATIVE=cryostat_center)\n", "\n", "inner_cryostat_vacuum = instrument.add_component(\"inner_cryostat_vacuum\", \"Union_cylinder\")\n", "inner_cryostat_vacuum.material_string = \"\\\"Vacuum\\\"\"\n", "inner_cryostat_vacuum.priority = 13\n", "inner_cryostat_vacuum.radius = 0.06\n", "inner_cryostat_vacuum.yheight = 0.15\n", "inner_cryostat_vacuum.set_AT([0, 0.01, 0], RELATIVE=cryostat_center)\n", "\n", "outer_cryostat_wall = instrument.add_component(\"outer_cryostat_wall\", \"Union_cylinder\")\n", "outer_cryostat_wall.material_string = \"\\\"Al\\\"\"\n", "outer_cryostat_wall.priority = 10\n", "outer_cryostat_wall.radius = 0.180\n", "outer_cryostat_wall.yheight = 0.355\n", "outer_cryostat_wall.p_interact = 0.20\n", "outer_cryostat_wall.set_AT([0, 0.032, 0], RELATIVE=cryostat_center)\n", "\n", "outer_cryostat_vacuum = instrument.add_component(\"outer_cryostat_vacuum\", \"Union_cylinder\")\n", "outer_cryostat_vacuum.material_string = \"\\\"Vacuum\\\"\"\n", "outer_cryostat_vacuum.priority = 11\n", "outer_cryostat_vacuum.radius = 0.178\n", "outer_cryostat_vacuum.yheight = 0.355\n", "outer_cryostat_vacuum.set_AT([0, 0.037, 0], RELATIVE=cryostat_center)\n", "\n", "# Set up loggers\n", "logger_space_zx = instrument.add_component(\"logger_space_zx\", \"Union_logger_2D_space\")\n", "logger_space_zx.n1 = 150\n", "logger_space_zx.n2 = 150\n", "logger_space_zx.D1_min = -0.2\n", "logger_space_zx.D1_max = 0.2\n", "logger_space_zx.D2_min = -0.2\n", "logger_space_zx.D2_max = 0.2\n", "logger_space_zx.D_direction_1 = '\"z\"'\n", "logger_space_zx.D_direction_2 = '\"x\"'\n", "logger_space_zx.filename = '\"logger_zx.dat\"'\n", "logger_space_zx.logger_conditional_extend_index = 1\n", "logger_space_zx.set_AT([0, 0, 0], RELATIVE=cryostat_center)\n", "\n", "logger_space_zy = instrument.add_component(\"logger_space_zy\", \"Union_logger_2D_space\")\n", "logger_space_zy.n1 = 150\n", "logger_space_zy.n2 = 150\n", "logger_space_zy.D1_min = -0.2\n", "logger_space_zy.D1_max = 0.2\n", "logger_space_zy.D2_min = -0.15\n", "logger_space_zy.D2_max = 0.2\n", "logger_space_zy.D_direction_1 = '\"z\"'\n", "logger_space_zy.D_direction_2 = '\"y\"'\n", "logger_space_zy.filename = '\"logger_zy.dat\"'\n", "logger_space_zy.logger_conditional_extend_index = 1\n", "logger_space_zy.set_AT([0, 0, 0], RELATIVE=cryostat_center)\n", "\n", "logger_2DQ = instrument.add_component(\"logger_2DQ_sample\", \"Union_logger_2DQ\")\n", "logger_2DQ.Q_direction_1 = '\"z\"'\n", "logger_2DQ.Q1_min = -4.0\n", "logger_2DQ.Q1_max = 4.0\n", "logger_2DQ.n1 = 100\n", "logger_2DQ.Q_direction_2 = '\"x\"'\n", "logger_2DQ.Q2_min = -4.0\n", "logger_2DQ.Q2_max = 4.0\n", "logger_2DQ.n2 = 100\n", "logger_2DQ.target_geometry = '\"sample\"'\n", "logger_2DQ.filename = '\"logger_2DQ_sample.dat\"'\n", "\n", "logger_2DQ = instrument.add_component(\"logger_2DQ_environment\", \"Union_logger_2DQ\")\n", "logger_2DQ.Q_direction_1 = '\"z\"'\n", "logger_2DQ.Q1_min = -4.0\n", "logger_2DQ.Q1_max = 4.0\n", "logger_2DQ.n1 = 100\n", "logger_2DQ.Q_direction_2 = '\"x\"'\n", "logger_2DQ.Q2_min = -4.0\n", "logger_2DQ.Q2_max = 4.0\n", "logger_2DQ.n2 = 100\n", "logger_2DQ.target_geometry = '\"inner_cryostat_wall,outer_cryostat_wall\"'\n", "logger_2DQ.filename = '\"logger_2DQ_all.dat\"'\n", "\n", "logger_time_all = instrument.add_component(\"logger_time_all\", \"Union_logger_1D\")\n", "logger_time_all.n1 = 600\n", "logger_time_all.min_value = 0.0008\n", "logger_time_all.max_value = 0.0015\n", "logger_time_all.filename = '\"scattering_time.dat\"'\n", "\n", "master = instrument.add_component(\"master\", \"Union_master\")\n", "\n", "# Adding a banana - tof detector\n", "banana_detector = instrument.add_component(\"banana_detector\", \"Monitor_nD\")\n", "banana_detector.set_RELATIVE(cryostat_center)\n", "banana_detector.xwidth = 1\n", "banana_detector.yheight = 0.2\n", "banana_detector.restore_neutron = 1\n", "options = '\"banana, theta limits=[-180,180] bins=361, t limits=[0.0011 0.0025] bins=500\"'\n", "banana_detector.options = options\n", "banana_detector.filename = '\"tof_b.dat\"'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Calculating theta\n", "Our YBaCuO sample has the 010 axis along the z axis and have 010 allowed with d = 3.8843. Here we calculate the necessary rotation of the crystal for satisfying the Bragg condition. This could also be done within the initialize section of the McStas instrument, but here we wish to preserve control over the A3_angle." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import math\n", "wavelength = 4.0\n", "theta = 180/3.14159*math.asin(wavelength/2.0/3.8843)\n", "print(theta)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "scroll-output" ] }, "outputs": [], "source": [ "instrument.set_parameters(wavelength=wavelength, A3_angle=theta)\n", "instrument.settings(ncount=3E6, output_path=\"data_folder/union_conditionals\")\n", "\n", "data = instrument.backengine()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "logger_zx = ms.name_search(\"logger_space_zx\", data)\n", "logger_zx.set_plot_options(log=True, orders_of_mag=9, colormap=\"jet\")\n", "\n", "logger_zy = ms.name_search(\"logger_space_zy\", data)\n", "logger_zy.set_plot_options(log=True, orders_of_mag=9, colormap=\"jet\")\n", "\n", "logger_2DQ_sample = ms.name_search(\"logger_2DQ_sample\", data)\n", "logger_2DQ_sample.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_2DQ_env = ms.name_search(\"logger_2DQ_environment\", data)\n", "logger_2DQ_env.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "ms.make_sub_plot([logger_zx, logger_zy, logger_2DQ_sample, logger_2DQ_env], fontsize=10)\n", "\n", "time = ms.name_search(\"logger_time_all\", data)\n", "time.set_plot_options(log=True)\n", "ms.make_sub_plot([time], fontsize=18)\n", "\n", "banana = ms.name_search(\"banana_detector\", data)\n", "banana.set_plot_options(log=True, orders_of_mag=7, cut_max=0.001)\n", "ms.make_sub_plot([banana], fontsize=18)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Interpretation of the data\n", "The data from the two spatial loggers show scattering location within the cryostat, and we see one beam entering the cryostat, yet two beams leaving as we satisfy the Bragg condition for the sample. This also result in scattering from when the scattered beam intersect the sample environment.\n", "\n", "We have two 2DQ loggers recording the scattering vector, one just for the sample and one for the sample environment. On the sample monitor we see that many Bragg peaks scatter some intensity, but 010 and 0-10 have the most intensity, they are at [0.9, -1.5] and [1.5, -0.9]. The two circles are incoherent scattering from the two most common wavevectors, the initial beam and the beam scattered from 010. On the 2DQ logger for the sample environment, we mainly see the Debye-Scherrer cones as lines within the circles defined by the two predominant wavevectors. It seems the used wavelength allows two different Bragg conditions to be met in the aluminium.\n", "\n", "The time logger show a surprising amount of complexity. The 5 peaks from entering and exiting two layers and intersecting the sample are clear, but all structure after 0.0012 is a surprise. There is also an unexpected peak at 0.00115, this may be the scattered beam intersecting the outer layer of the cryostat, this happens a bit sooner than the direct beam because the path is shorter when scattered from the front of the sample.\n", "\n", "The time of flight vs 2theta monitor also has a large amount of complexity that is not simple to explain. The bright spot at [0, 0.00155] is the direct beam, while the spot at [60, 0.00155] is the scattered beam. The horizontal line at t=0.00155 must be incoherent scattering from the sample, as it must have had the same distance to all points on the detector. The curved lower branch could be incoherent scattering from where the beam enters the cryostat, as that is closest to the 180 deg point on the detector. The remaining hot spots are all some Debye Scherrer cones from a beam entering or exiting the sample environment, and the more blurry spots may be of even higher order." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Conditional components\n", "We can use conditional components to investigate peaks in the final scattering pattern, by limiting the loggers to only recording events that for example end in a certain spot. Currently there are two available\n", "- Union_conditional_standard\n", "- Union_conditional_PSD\n", "\n", "The standard version allows limits for energy, time and number of scattering events for the neutron when it exits the *Union_master* simulation, in this case when it leaves the sample environment.\n", "\n", "The PSD version propagates the final neutron states to a given rectangular surface and it is possible to filter the logger events on the neutron state when it reaches this surface, and ignores all events that misses. This is what we will use here to investigate a peak in the scattering pattern. We also set a time limit as our detector is time of flight sensitive.\n", "\n", "Here are the important parameters for the Union_conditional_PSD component\n", "- target_loggers : comma separated string of logger names this conditional should affect\n", "- xwidth : width of rectangle\n", "- yheight : height of rectangle\n", "- time_min : lower time limit for condition\n", "- time_max : upper time limit for condition\n", "- overwrite_logger_weight : If set to 1, will weight logger results with the final ray weight" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Set up instrument parameters describing what spot to investigate\n", "instrument.add_parameter(\"tag_angle\", value=-95)\n", "instrument.add_parameter(\"tag_time\", value=0.00188)\n", "instrument.add_parameter(\"tag_interval\", value=9E-5)\n", "\n", "# Set up an arm pointing to the relevant spot\n", "spot_dir = instrument.add_component(\"spot_dir\", \"Arm\",\n", " RELATIVE=cryostat_center, before=\"master\")\n", "spot_dir.set_ROTATED([0, \"tag_angle\", 0], RELATIVE=cryostat_center)\n", "\n", "# Set up a conditional component targeting all our loggers\n", "PSD_conditional = instrument.add_component(\"space_all_PSD_conditional\", \"Union_conditional_PSD\",\n", " before=\"master\")\n", "\n", "loggers = '\"logger_space_zx,logger_space_zy,logger_time_all,logger_2DQ_sample,logger_2DQ_environment\"'\n", "PSD_conditional.target_loggers = loggers\n", "PSD_conditional.xwidth = 0.2\n", "PSD_conditional.yheight = 0.2\n", "PSD_conditional.time_min = \"tag_time-0.5*tag_interval\"\n", "PSD_conditional.time_max = \"tag_time+0.5*tag_interval\"\n", "# Ensure the position of the conditional rectangle is on the detector surface\n", "PSD_conditional.set_AT([0, 0, 0.5], RELATIVE=spot_dir) \n", "\n", "# Add a monitor with flag that is only active when the condition in the conditional is true\n", "instrument.add_declare_var(\"int\", \"flag1\")\n", "logger_space_zx.logger_conditional_extend_index = 1\n", "master.append_EXTEND(\"flag1 = logger_conditional_extend_array[1];\")\n", "\n", "# Copy of our banana detector, but with WHEN condition to verify we are investigating the right peak\n", "banana_detector = instrument.add_component(\"banana_detector_limited\", \"Monitor_nD\")\n", "banana_detector.set_RELATIVE(cryostat_center)\n", "banana_detector.xwidth = 1\n", "banana_detector.yheight = 0.2\n", "banana_detector.restore_neutron = 1\n", "options = '\"banana, theta limits=[-180,180] bins=361, t limits=[0.0011 0.0025] bins=500\"'\n", "banana_detector.options = options\n", "banana_detector.filename = '\"tof_b_limited.dat\"'\n", "banana_detector.set_WHEN(\"flag1 > 0\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Run the simulation\n", "We run the simulation again with a larger ncount, as the loggers now only record a small fraction of the scattered neutrons. You can investigate other areas of interest by changing *tag_angle*, *tag_time* and *tag_interval* to another interesting location on the time of flight detector.\n", "\n", "If MPI is installed add mpi=N where N is the number of CPU cores available in your computer to speed up the simulation." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "scroll-output" ] }, "outputs": [], "source": [ "instrument.set_parameters(wavelength=wavelength, A3_angle=theta, \n", " tag_angle=-95, tag_time=0.00188, tag_interval=9E-5)\n", "instrument.settings(ncount=3E6) # Can add mpi to improve speed for this longer simulation\n", "\n", "data_con = instrument.backengine()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Confirm our conditional is on the desired peak\n", "First we plot our 2theta / time of flight detector and the version limited to what the conditional records to confirm that we selected an appropriate region to investigate." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "banana = ms.name_search(\"banana_detector\", data_con)\n", "banana.set_plot_options(log=True, orders_of_mag=7, cut_max=0.001)\n", "\n", "banana_limited = ms.name_search(\"banana_detector_limited\", data_con)\n", "banana_limited.set_plot_options(log=False)\n", "\n", "ms.make_sub_plot([banana, banana_limited], fontsize=10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Plotting the loggers, now limited by the conditional\n", "We use a different colormap here instead of the standard jet, because in jet the lowest and highest intensity are both dark colors. By choosing a colormap where zero intensity is white, it blends in with white from lack of data which is beneficial in this situation for clearly seeing the hotspots." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "logger_zx = ms.name_search(\"logger_space_zx\", data_con)\n", "logger_zx.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_zy = ms.name_search(\"logger_space_zy\", data_con)\n", "logger_zy.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_2DQ_sample = ms.name_search(\"logger_2DQ_sample\", data_con)\n", "logger_2DQ_sample.set_plot_options(log=True, orders_of_mag=7, colormap=\"YlOrRd\")\n", "\n", "logger_2DQ_env = ms.name_search(\"logger_2DQ_environment\", data_con)\n", "logger_2DQ_env.set_plot_options(log=True, orders_of_mag=7, colormap=\"YlOrRd\")\n", "\n", "ms.make_sub_plot([logger_zx, logger_zy, logger_2DQ_sample, logger_2DQ_env], fontsize=10)\n", "\n", "time = ms.name_search(\"logger_time_all\", data_con)\n", "time.set_plot_options(log=True, orders_of_mag=6)\n", "\n", "ms.make_sub_plot([time], fontsize=18)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Interpreting the data from loggers with conditional\n", "Now that the loggers only show scattering from neutrons that end in our specific peak of interest, we can explain the origin of this peak. The spatial loggers show that scattering primarily happens in the sample, and in the outer part of the cryostat where the scattered beam leaves the sample environment. It is in this case obvious the first scattering is in the sample, as the exit area is not within the direct beam, but one can create individual loggers for each scattering order in order to confirm this.\n", "\n", "On the 2DQ logger for the sample it is clear the scattering is from the main Bragg peak (010 and 0-10). We see two peaks as a ray scattered from a Bragg peak will fulfil the Bragg condition of the opposite reciprocal indices. On the 2DQ logger for the sample environment, we see the brightest spot is a small part of a Debye-Scherrer cone. Scattered neutrons from other parts of this cone will not hit our conditional PSD, some may not even hit the detector at all.\n", "\n", "That means this specific peak was an uneven number of single crystal scattering events in 010/0-10 in the sample followed by a powder scattering in the outer wall of the sample environment. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Using the final weight option\n", "Here we rerun the simulation with the overwrite_logger_weight option in the conditional turned on to see the effect. Without it a ray is recorded in the loggers if it satisfy the conditional, but it does not matter how large the final weight is. For this reason, some rays with high sampling probability to reach the condition but low weight are represented more than is appropriate. This is mainly important when shielding is simulated, as ray that pass through the shielding needs can be heavily overrepresented." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "tags": [ "scroll-output" ] }, "outputs": [], "source": [ "PSD_conditional.overwrite_logger_weight = 1\n", "\n", "data_con_f = instrument.backengine()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "logger_zx = ms.name_search(\"logger_space_zx\", data_con_f)\n", "logger_zx.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_zy = ms.name_search(\"logger_space_zy\", data_con_f)\n", "logger_zy.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_2DQ_sample = ms.name_search(\"logger_2DQ_sample\", data_con_f)\n", "logger_2DQ_sample.set_plot_options(log=True, orders_of_mag=7, colormap=\"YlOrRd\")\n", "\n", "logger_2DQ_env = ms.name_search(\"logger_2DQ_environment\", data_con_f)\n", "logger_2DQ_env.set_plot_options(log=True, orders_of_mag=7, colormap=\"YlOrRd\")\n", "\n", "ms.make_sub_plot([logger_zx, logger_zy, logger_2DQ_sample, logger_2DQ_env], fontsize=10)\n", "\n", "time = ms.name_search(\"logger_time_all\", data_con_f)\n", "time.set_plot_options(log=True, orders_of_mag=6)\n", "\n", "ms.make_sub_plot([time], fontsize=18)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Comparison between normal and overwrite_logger_weight\n", "Here we make a direct comparison, and see only a slight difference in this case. No shielding is simulated here which would cause a much more clear difference." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "logger_zx = ms.name_search(\"logger_space_zx\", data_con)\n", "logger_zx.set_title(\"Conditional\")\n", "logger_zx.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_zy = ms.name_search(\"logger_space_zy\", data_con)\n", "logger_zy.set_title(\"Conditional\")\n", "logger_zy.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_zx_f = ms.name_search(\"logger_space_zx\", data_con_f)\n", "logger_zx_f.set_title(\"Conditional final weight\")\n", "logger_zx_f.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "logger_zy_f = ms.name_search(\"logger_space_zy\", data_con_f)\n", "logger_zy_f.set_title(\"Conditional final weight\")\n", "logger_zy_f.set_plot_options(log=True, orders_of_mag=9, colormap=\"YlOrRd\")\n", "\n", "ms.make_sub_plot([logger_zx, logger_zy, logger_zx_f, logger_zy_f], fontsize=10)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "celltoolbar": "Tags", "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" }, "metadata": { "execution": { "timeout": 200 } } }, "nbformat": 4, "nbformat_minor": 2 }