Index: app/config/development.py
===================================================================
--- app/config/development.py	(revision f332509fdb2f8f082251691c5dab0691643d8d12)
+++ app/config/development.py	(revision 7e44c10d48cfcca2afe0aac4476ad11522c5826a)
@@ -1,3 +1,3 @@
-# -*- coding: utf-8 -*-
+﻿# -*- coding: utf-8 -*-
 
 """
@@ -36,2 +36,3 @@
 IDF_PATH ="/home/flask/paramData/monitors.xml"
 ICAT_URL = "https://test.csns.ihep.ac.cn:8181"
+CAL_PATH = "/home/flask/paramData"
Index: app/jobs.py
===================================================================
--- app/jobs.py	(revision 7692360a15a1fa626b3dc29d5c75e33363af32b4)
+++ app/jobs.py	(revision 7e44c10d48cfcca2afe0aac4476ad11522c5826a)
@@ -12,9 +12,34 @@
 import mantid.simpleapi as md
 from .models import hcline
-from .config.development import REDIS_URL, NEXUS_PATH, IDF_PATH
+from .config.development import REDIS_URL, NEXUS_PATH, IDF_PATH, CAL_PATH
+
+
+#for the searching of mask and calibration files
+import os
+from os import walk
+
 
 prepath_data = NEXUS_PATH
 monsIDF = IDF_PATH
-
+cal_file_path=CAL_PATH
+mask_file_path=CAL_PATH
+
+def find_mask_file():
+    mask_files=[]
+    for (root, dirs, files) in walk(mask_file_path):
+        for f in files:
+            if f[0:4] == "mask":
+                mask_files.append(f)
+    return mask_files
+    
+    
+def find_cal_file():
+    cal_files=[]
+    for (root, dirs, files) in walk(cal_file_path):
+        for f in files:
+            if f[0:11] == "calibration":
+                cal_files.append(f)
+    return cal_files
+               
 def loadMonsWS(wsList, output):
     for ix in wsList:
@@ -188,2 +213,14 @@
  
     socket.emit(data['event'], series, namespace=ns)
+'''
+@myrq.job
+def find_mask_file(ns):
+    mask_files=[]
+    for (root, dirs, files) in walk(mask_file_path):
+        for f in files:
+            if f[-1:4] = "mask":
+                mask_files.append(f)
+            
+        
+    socket.emit(data['event'], mask_files, namespace=ns)
+'''
Index: app/sans/templates/analysis.html
===================================================================
--- app/sans/templates/analysis.html	(revision 7692360a15a1fa626b3dc29d5c75e33363af32b4)
+++ app/sans/templates/analysis.html	(revision 7e44c10d48cfcca2afe0aac4476ad11522c5826a)
@@ -23,4 +23,6 @@
         let proposal = '{{proposal.Investigation.id}}|{{proposal.Investigation.name}}';
         let instrument = '{{proposal.Investigation.investigationInstruments[0].instrument.id}}|{{proposal.Investigation.investigationInstruments[0].instrument.name}}'
+        
+        
         let options = {
             credits: {
@@ -35,5 +37,5 @@
            let trans_m3_chart = Highcharts.chart('trans_m3_plot', options);
            let cal_trans_chart = Highcharts.chart('cal_trans_plot', options);
-
+           
             document.getElementById('plot_trans_empty_trans').addEventListener('click', (event) => {
                 let elem_sample = document.getElementById('trans_sample_trans_runno');
@@ -295,4 +297,7 @@
            <select id="calibration_file" name="calibration_file" class="custom-select">
                  <option value="" selected>Please select a calibration file</option>
+                     {% for cal_file in cal_files %}
+                         <option value="{{cal_file}}">({{cal_file}})</option> 
+                     {% endfor %}
                        <!--{% for dataset in proposal.Investigation.datasets %}
                            <option value="{{dataset.name.strip('__csns__')}}">{{ dataset.name.strip('__csns__RUN') }} ({{dataset.description}})</option> 
@@ -304,4 +309,7 @@
            <select id="mask_file" name="mask_file" class="custom-select">
                  <option value="" selected>Please select a mask file</option>
+                     {% for mask_file in mask_files %}
+                         <option value="{{mask_file}}">({{mask_file}})</option> 
+                     {% endfor %}
                        <!--{% for dataset in proposal.Investigation.datasets %}
                            <option value="{{dataset.name.strip('__csns__')}}">{{ dataset.name.strip('__csns__RUN') }} ({{dataset.description}})</option> 
Index: app/sans/views.py
===================================================================
--- app/sans/views.py	(revision 7692360a15a1fa626b3dc29d5c75e33363af32b4)
+++ app/sans/views.py	(revision 7e44c10d48cfcca2afe0aac4476ad11522c5826a)
@@ -19,5 +19,5 @@
 import signal
 from flask import current_app as app
-from app.jobs import plot_trans_empty_trans, plot_trans_sample_trans, cal_trans
+from app.jobs import plot_trans_empty_trans, plot_trans_sample_trans, cal_trans, find_mask_file, find_cal_file
 from app.auth import icat_helper, auth_helper, auth
 from app import socketio
@@ -66,4 +66,16 @@
         #job = myrq.get_queue(calcTrans).enqueue(args=(self.namespace, data))
         job=cal_trans.queue(self.namespace, data)
+    '''
+    def on_find_mask_file(self):
+        print("<==================================")
+        print("on find mask file")
+        #print (self.namespace[0:]," to redis", data)
+
+        #data['Trans_SampleTransRun']=['RUN0006095']
+        #data['Trans_EmptyTransRun']=['RUN0006096']
+        #job =myrq.get_queue().enqueue(calcTrans, args=(self.namespace, data))
+        #job = myrq.get_queue(calcTrans).enqueue(args=(self.namespace, data))
+        job=find_mask_file.queue(self.namespace)
+    '''
 
     def on_connect(self):
@@ -186,10 +198,23 @@
 
         socketio.on_namespace(myNamespace('/'+ _uuid))
+        
     except Exception as ex:
         flash(str(ex))
 
     print("<==================================")
-    return render_template('analysis.html', proposal=_proposal, uuid = _uuid)
- 
+    
+    _mask_files=find_mask_file()
+    _cal_files=find_cal_file()
+    
+    return render_template('analysis.html', proposal=_proposal, uuid = _uuid, mask_files=_mask_files, cal_files=_cal_files)
+
+'''
+def return_conf_files():
+    print("<==================================")
+    print("conf files autoload")    
+    _mask_files=find_mask_file()
+    return render_template('analysis.html', mask_files=_mask_files)
+'''
+
 def clearon():
     #myredis.delete("flask_client")
