diff --git a/Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py b/Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py new file mode 100644 index 0000000..bb5333a --- /dev/null +++ b/Build_Mantid_config/Build_Mantid_config/tuf666699/RB1999000/MARIReduction_2000_1.py @@ -0,0 +1,2 @@ +#Test reduction file +Contents=None \ No newline at end of file diff --git a/Build_Mantid_config/UpgradeLog.XML b/Build_Mantid_config/UpgradeLog.XML new file mode 100644 index 0000000..401bd34 Binary files /dev/null and b/Build_Mantid_config/UpgradeLog.XML differ diff --git a/Build_Mantid_config/UpgradeLog.htm b/Build_Mantid_config/UpgradeLog.htm new file mode 100644 index 0000000..3b45160 Binary files /dev/null and b/Build_Mantid_config/UpgradeLog.htm differ diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.css b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.css new file mode 100644 index 0000000..2edaaf3 --- /dev/null +++ b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.css @@ -0,0 +1,118 @@ +/* Body style, for the entire document */ +body +{ + background: #F3F3F4; + color: #1E1E1F; + font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; + padding: 0; + margin: 0; +} + +/* Header1 style, used for the main title */ +h1 +{ + padding: 10px 0px 10px 10px; + font-size: 21pt; + background-color: #E2E2E2; + border-bottom: 1px #C1C1C2 solid; + color: #201F20; + margin: 0; + font-weight: normal; +} + +/* Header2 style, used for "Overview" and other sections */ +h2 +{ + font-size: 18pt; + font-weight: normal; + padding: 15px 0 5px 0; + margin: 0; +} + +/* Header3 style, used for sub-sections, such as project name */ +h3 +{ + font-weight: normal; + font-size: 15pt; + margin: 0; + padding: 15px 0 5px 0; + background-color: transparent; +} + +/* Color all hyperlinks one color */ +a +{ + color: #1382CE; +} + +/* Table styles */ +table +{ + border-spacing: 0 0; + border-collapse: collapse; + font-size: 10pt; +} + +table th +{ + background: #E7E7E8; + text-align: left; + text-decoration: none; + font-weight: normal; + padding: 3px 6px 3px 6px; +} + +table td +{ + vertical-align: top; + padding: 3px 6px 5px 5px; + margin: 0px; + border: 1px solid #E7E7E8; + background: #F7F7F8; +} + +/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */ +.localLink +{ + color: #1E1E1F; + background: #EEEEED; + text-decoration: none; +} + +.localLink:hover +{ + color: #1382CE; + background: #FFFF99; + text-decoration: none; +} + +/* Center text, used in the over views cells that contain message level counts */ +.textCentered +{ + text-align: center; +} + +/* The message cells in message tables should take up all avaliable space */ +.messageCell +{ + width: 100%; +} + +/* Padding around the content after the h1 */ +#content +{ + padding: 0px 12px 12px 12px; +} + +/* The overview table expands to width, with a max width of 97% */ +#overview table +{ + width: auto; + max-width: 75%; +} + +/* The messages tables are always 97% width */ +#messages table +{ + width: 97%; +} \ No newline at end of file diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.xslt b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.xslt new file mode 100644 index 0000000..b3f857c --- /dev/null +++ b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport.xslt @@ -0,0 +1,558 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ + + + + Solution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Error + Warning + Success + + + + + + + + + + + + + + + + + + + + + + + + + + + + Message + Warning + Error + Message + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ProjectPathErrorsWarningsMessages
+ + + + _UpgradeReport_Files\UpgradeReport_Error.png + _UpgradeReport_Files\UpgradeReport_Warning.png + _UpgradeReport_Files\UpgradeReport_Success.png + + + + + + + + + + + + + + + Solution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ' + + + + + + + +
+
+ + + + + + + + + + + + + ' + + + + + + + + + + + Show additional messages + + + + + + + + + + + + + + + + + ' + + + + + + + + + + + Hide additional messages + + + + + + + + + + + + + + display: none + + + + + + + + + + + _UpgradeReport_Files\UpgradeReport_Error.png + _UpgradeReport_Files\UpgradeReport_Warning.png + _UpgradeReport_Files\UpgradeReport_Information.png + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + +

Solution

+
+ +

+ +

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Message
+ + + Solution logged no messages. + + logged no messages. +
+
+
+ + + + + + + +]]> + + + + + + + + Migration Report + + + + + +

+ Migration Report - +

+ +
+

Overview

+ + + + +
+ +
+ +

Solution and projects

+ +
+ +
+
+ + +
+ +
\ No newline at end of file diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Error.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Error.png new file mode 100644 index 0000000..4b48983 Binary files /dev/null and b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Error.png differ diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Information.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Information.png new file mode 100644 index 0000000..fc631e2 Binary files /dev/null and b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Information.png differ diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Success.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Success.png new file mode 100644 index 0000000..c8c27bc Binary files /dev/null and b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Success.png differ diff --git a/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Warning.png b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Warning.png new file mode 100644 index 0000000..7197e03 Binary files /dev/null and b/Build_Mantid_config/_UpgradeReport_Files/UpgradeReport_Warning.png differ diff --git a/RunReduction/module1.py b/RunReduction/module1.py new file mode 100644 index 0000000..7cf0364 --- /dev/null +++ b/RunReduction/module1.py @@ -0,0 +1,195 @@ +#pylint: disable=invalid-name +import os +#os.environ["PATH"] =\ +#r"c:/Mantid/Code/builds/br_master/bin/Release;"+os.environ["PATH"] +""" Sample MARI reduction scrip used in testing ReductionWrapper """ +from Direct.ReductionWrapper import * +try: + import reduce_vars as web_var +except: + web_var = None + + +class ReduceMARIFromFile(ReductionWrapper): + @MainProperties + def def_main_properties(self): + """Define main properties used in reduction. These are the property + a user usually wants to change + """ + prop = {} + # if energy is specified as a list (even with single value e.g. ei=[81]) + # The numbers are treated as a fraction of ei [from ,step, to ]. If energy is + # a number, energy binning assumed to be absolute (e_min, e_step,e_max) + # + prop['incident_energy'] = 12 + prop['energy_bins'] = [-11,0.05,11] + # + # the range of files to reduce. This range ignored when deployed from autoreduction, + # unless you going to sum these files. + # The range of numbers or run number is used when you run reduction from PC. + + prop['sample_run'] = 11001 + prop['wb_run'] = 11060 + + # + prop['sum_runs'] = False # set to true to sum everything provided to sample_run + # # list + # Absolute units reduction properties. Set prop['monovan_run']=None to do relative units + prop['monovan_run'] = 11015 + prop['sample_mass'] = 10 + prop['sample_rmm'] = 435.96 + return prop + + @AdvancedProperties + def def_advanced_properties(self): + """Set up advanced properties, describing reduction. + These are the properties, usually provided by an instrument + scientist + + separation between simple and advanced properties depends + on scientist, experiment and user. All are necessary for reduction + to work properly + """ + prop = {} + prop['map_file'] = "mari_res.map" + prop['monovan_mapfile'] = "mari_res.map" + #prop['hardmaskOnly']=maskfile # disable diag, use only hard mask + prop['hard_mask_file'] = "mar11015.msk" + prop['det_cal_file'] = 11060 + #prop['data_file_ext']='.nxs' # if two input files with the same name and + #different extension found, what to prefer. + # there is currently bug in loadISISnexus, not loading monitors properly. + # When it fixed, the value of this parameter will be irrelevant + prop['load_monitors_with_workspace'] = True + # change this to correct value and verify that motor_log_names refers correct and existing + # log name for crystal rotation to write correct psi value into nxspe files + prop['motor_offset']=None + return prop + # + @iliad + def reduce(self,input_file=None,output_directory=None): + """Method executes reduction over single file + + Overload only if custom reduction is needed or + special features are requested + """ + + outWS = ReductionWrapper.reduce(self,input_file,output_directory) + #SaveNexus(outWS,Filename = 'MARNewReduction.nxs') + # Does the possibility to return PATH where to copy from web-services exist? + return outWS + + def validate_result(self,build_validation=False): + """Change this method to verify different results""" + # build_validation -- if true, build and save new workspace rather then validating the old one + rez,message = ReductionWrapper.build_or_validate_result(self,11001,"MARIReduction.nxs",build_validation,1.e-5) + return rez,message + + def set_custom_output_filename(self): + """ define custom name of output files if standard one is not satisfactory + In addition to that, example of accessing reduction properties + Changing them if necessary + """ + def custom_name(prop_man): + """Sample function which builds filename from + incident energy and run number and adds some auxiliary information + to it. + """ + # Note -- properties have the same names as the list of advanced and + # main properties + ei = prop_man.incident_energy + # sample run is more then just list of runs, so we use + # the formalization below to access its methods + run_num = PropertyManager.sample_run.run_number() + name = "RUN{0}atEi{1:<4.1f}meV_One2One".format(run_num ,ei) + return name + + # Uncomment this to use custom filename function + # Note: the properties are stored in prop_man class accessed as + # below. + #return custom_name(self.reducer.prop_man) + # use this method to use standard file name generating function + return None + + + def __init__(self,web_var=None): + """ sets properties defaults for the instrument with Name""" + ReductionWrapper.__init__(self,'MAR',web_var) +#-------------------------------------------------------------------------------------------------# +#-------------------------------------------------------------------------------------------------# +#-------------------------------------------------------------------------------------------------# +def main(input_file=None,output_directory=None): + """ This method is used to run code from web service + and should not be touched except changing the name of the + particular ReductionWrapper class (e.g. ReduceMARI here) + + You can also change the output folder to save data to + where web services will copy data + + This method will go when web service implements proper factory + """ + # note web variables initialization + rd = ReduceMARIFromFile(web_var) + rd.reduce(input_file,output_directory) + # change to the name of the folder to save data to + return '' + +if __name__ == "__main__": +#------------------------------------------------------------------------------------# +# SECTION USED TO RUN REDUCTION FROM MANTID SCRIPT WINDOW # +#------------------------------------------------------------------------------------# +##### Here one sets up folders where to find input data and where to save results #### + # It can be done here or from Mantid GUI: + # File->Manage user directory ->Browse to directory + # Folder where map and mask files are located: + #map_mask_dir = 'c:/Users/wkc26243/Documents/work/Libisis/InstrumentFiles/maps' + # folder where input data can be found + #data_dir = 'd:/Data/Mantid_Testing/15_01_27/autoreduce_maps' + root=os.path.dirname(os.path.realpath(__file__)) + data_dir = os.path.join(root,r'data') + + config.appendDataSearchDir(root) + config.appendDataSearchDir(data_dir) + config['defaultsave.directory']=root +###### Initialize reduction class above and set up reduction properties. ###### +###### Note no web_var in constructor.(will be irrelevant if factory is implemented) + rd = ReduceMARIFromFile() + rd.def_advanced_properties() + rd.def_main_properties() + +#### uncomment rows below to generate web variables and save then to transfer to ### + ## web services. + run_dir = os.path.dirname(os.path.realpath(__file__)) + file = os.path.join(run_dir,'reduce_vars.py') + rd.save_web_variables(file) + +#### Set up time interval (sec) for reducer to check for input data file. #### + # If this file is not present and this value is 0,reduction fails + # if this value >0 the reduction wait until file appears on the data + # search path checking after time specified below. + rd.wait_for_file = 0 # waiting time interval + +####get reduction parameters from properties above, override what you want locally ### + # and run reduction. Overriding would have form: + # rd.reducer.property_name (from the dictionary above) = new value e.g. + # rd.reducer.energy_bins = [-40,2,40] + # or + ## rd.reducer.sum_runs = False + +###### Run reduction over all run numbers or files assigned to ###### + # sample_run variable + + # return output workspace only if you are going to do + # something with it here. Running range of runs will return the array + # of workspace pointers. + #red_ws = rd.run_reduction() + # usual way to go is to reduce workspace and save it internally + #rd.run_reduction() + + +#### Validate reduction result against known result, obtained earlier ### + rez,mess=rd.validate_result() + if not rez: + raise RuntimeError("validation failed with error: {0}".format(mess)) + else: + print "ALL Fine" diff --git a/Test_Mantid_config/Test_Mantid_config.pyproj b/Test_Mantid_config/Test_Mantid_config.pyproj new file mode 100644 index 0000000..9cde26d --- /dev/null +++ b/Test_Mantid_config/Test_Mantid_config.pyproj @@ -0,0 +1,31 @@ + + + + Debug + 2.0 + 8c7fe82f-dedc-45a7-b287-2fec77e9d53a + . + d:\users\abuts\SVN\ISIS_analysisscripts\Build_Mantid_config.py + c:/Mantid/Code/builds/br_master/bin/Release;c:\Mantid\Code\Mantid\scripts\test;C:\Mantid\Code\Third_Party\lib\win64;c:\Mantid\Code\Mantid\scripts\Inelastic + . + . + Build_Mantid_config + Build_Mantid_config + Standard Python launcher + c:\Mantid\Code\builds\br_master\bin\Release\python.exe + False + False + + + true + false + + + true + false + + + + + + \ No newline at end of file diff --git a/Test_Mantid_config/Test_Mantid_config.sln b/Test_Mantid_config/Test_Mantid_config.sln new file mode 100644 index 0000000..1ed0893 --- /dev/null +++ b/Test_Mantid_config/Test_Mantid_config.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "Test_Mantid_config", "Test_Mantid_config.pyproj", "{8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C7FE82F-DEDC-45A7-B287-2FEC77E9D53A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VSArea_Projects/ReduceLET/ReduceLET.pyproj b/VSArea_Projects/ReduceLET/ReduceLET.pyproj index 80e2112..6ef5f79 100644 --- a/VSArea_Projects/ReduceLET/ReduceLET.pyproj +++ b/VSArea_Projects/ReduceLET/ReduceLET.pyproj @@ -5,19 +5,18 @@ 2.0 a7a5f658-0191-4c55-a995-931b9be33661 D:\Data\isis\Let\June2013\ - d:\Data\Mantid_Testing\15_10_02\SumRunsTatiana.py - c:\Mantid\Code\builds\br_master\bin\Release;c:\Mantid\Code\Mantid\scripts\Inelastic;c:\Mantid\Code\Third_Party\lib\win64;d:\Data\MatidScripsPublicRepository\direct_inelastic\ISIS\qtiGenie + c:\Mantid\Testing\SystemTests\tests\analysis\ISIS_LETReduction.py + c:\Mantid\scripts\Inelastic;c:\Mantid\_builds\br_master\bin\Release;c:\Mantid\Third_Party\lib\win64;c:\Mantid\Testing\SystemTests\tests\analysis;d:\Data\MatidScripsPublicRepository\direct_inelastic\ISIS\qtiGenie . . - 00000000-0000-0000-0000-000000000000 - - + {1e3a12e0-0644-44c9-b078-9d1b6368e04e} + 2.7 ReduceLET ReduceLET False Standard Python launcher - c:\Mantid\Code\builds\br_master\bin\Release\python.exe + c:\Mantid\_builds\br_master\bin\Release\python.exe False @@ -34,5 +33,8 @@ + + + \ No newline at end of file diff --git a/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj b/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj index 512c63f..e7b4454 100644 --- a/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj +++ b/test_DirectEnergyConversion/DirectEnergyConversionTest.pyproj @@ -4,10 +4,10 @@ Debug 2.0 7de7d019-7039-4e37-9aab-8bc165b6acb0 - c:\Mantid\Code\Mantid\scripts\test\ - c:\Mantid\Code\Mantid\scripts\test\DirectEnergyConversionTest.py - c:\Mantid\Code\builds\br_master\bin\Release;c:\Mantid\Code\Mantid\scripts\Inelastic;c:\Mantid\Code\Third_Party\lib\win64 - c:\Mantid\Code\Mantid\scripts\Inelastic + c:\Mantid\scripts\test\ + c:\Mantid\scripts\test\DirectEnergyConversionTest.py + c:\Mantid\_builds\br_master\bin\Release;c:\Mantid\scripts\Inelastic;c:\Mantid\Third_Party\lib\win64 + c:\Mantid\scripts\Inelastic . 00000000-0000-0000-0000-000000000000 @@ -17,7 +17,7 @@ False Standard Python launcher - c:\programming\Python27\python.exe + c:\Mantid\_builds\br_master\bin\Release\python.exe False diff --git a/test_MatrixWS/test_MatrixWS.py b/test_MatrixWS/test_MatrixWS.py new file mode 100644 index 0000000..df1dc68 --- /dev/null +++ b/test_MatrixWS/test_MatrixWS.py @@ -0,0 +1 @@ +print('Hello World') diff --git a/test_MatrixWS/test_MatrixWS.pyproj b/test_MatrixWS/test_MatrixWS.pyproj new file mode 100644 index 0000000..adaef90 --- /dev/null +++ b/test_MatrixWS/test_MatrixWS.pyproj @@ -0,0 +1,44 @@ + + + + Debug + 2.0 + e6512e09-3f20-4f2f-b1e7-ce8364b6b148 + . + c:\Mantid\Framework\PythonInterface\test\python\mantid\api\MatrixWorkspaceTest.py + c:\Mantid\_builds\br_master\bin\Release;c:\Mantid\scripts\Inelastic;C:\Mantid\Third_Party\lib\win64 + . + . + test_MatrixWS + test_MatrixWS + False + Standard Python launcher + False + c:\Mantid\_builds\br_master\bin\Release\python.exe + + + true + false + + + true + false + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + + + + + + + + + \ No newline at end of file diff --git a/test_MatrixWS/test_MatrixWS.sln b/test_MatrixWS/test_MatrixWS.sln new file mode 100644 index 0000000..1f65e81 --- /dev/null +++ b/test_MatrixWS/test_MatrixWS.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "test_MatrixWS", "test_MatrixWS.pyproj", "{E6512E09-3F20-4F2F-B1E7-CE8364B6B148}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E6512E09-3F20-4F2F-B1E7-CE8364B6B148}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6512E09-3F20-4F2F-B1E7-CE8364B6B148}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/test_RunDescriptor/RunDescriptorTest.pyproj b/test_RunDescriptor/RunDescriptorTest.pyproj index 0618f50..99b3472 100644 --- a/test_RunDescriptor/RunDescriptorTest.pyproj +++ b/test_RunDescriptor/RunDescriptorTest.pyproj @@ -5,15 +5,18 @@ 2.0 26b5f999-0dab-421b-8108-f5f37d50287f . - c:\Mantid\Code\Mantid\scripts\test\RunDescriptorTest.py - c:\Mantid\Code\Mantid\scripts\test;c:\Mantid\Code\builds\br_master\bin\Release;C:\Mantid\Code\Third_Party\lib\win64;d:\Data\MantidSystemTests\SystemTests\AnalysisTests;c:\Mantid\Code\Mantid\scripts\Inelastic - c:\Mantid\Code\Mantid\scripts\test + c:\Mantid\scripts\test\RunDescriptorTest.py + c:\Mantid\scripts\test;c:\Mantid\_builds\br_master\bin\Release;C:\Mantid\Third_Party\lib\win64;c:\Mantid\Testing\SystemTests\tests\analysis;c:\Mantid\scripts\Inelastic + c:\Mantid\scripts\test . RunPropertyTest RunPropertyTest Standard Python launcher False False + c:\Mantid\_builds\br_master\bin\Release\Python.exe + {261136f3-06df-4ab0-8330-dfac633afb6a} + 2.7 true @@ -27,6 +30,10 @@ 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.targets + + + +